Posted By

TheJasonParker on 01/17/11


Tagged

magento


Versions (?)

Magento Memory Leak v1.4.1.1 (The Array of Death)


 / Published in: PHP
 

URL: http://blog.ewtechnologies.com/magento-2/magento-memory-leak-1-4-1-1/

This fixes the way Magento imports data as it just keeps adding ‘straight join’ to the array which uses a lot of memory if your importing a lot of products and will kill the import.

Replace this function in /lib/Varien/Db/Select.php

This has been fixed in the next update and a discussion can be seen here...

http://www.magentocommerce.com/boards/viewthread/113901/

  1. public function __construct(Zend_Db_Adapter_Abstract $adapter)
  2. {
  3. parent::__construct($adapter);
  4. if (!in_array(self::STRAIGHT_JOIN_ON, self::$_joinTypes)) {
  5. self::$_joinTypes[] = self::STRAIGHT_JOIN_ON;
  6. self::$_partsInit = array(self::STRAIGHT_JOIN => false) + self::$_partsInit;
  7. }
  8. }

Report this snippet  

You need to login to post a comment.