This project has around 150k skus with stock management enabled, most of them are configurable products... We've been live with 256Mb php memory_limit
, but during last weeks we're having allowed memory errors during checkout
Errors come when last available unit of a configurable child is sold (stock status change)
We've fixed this raising memory_limit
to 512Mb, but I'd like to see which data is consuming so much memory, the concrete piece of code firing the error is the setNewData()
line in mergePreviousData()
method, in Mage_Index_Model_Event class
public function mergePreviousData($data)
{
if (!empty($data['event_id'])) {
$this->setId($data['event_id']);
$this->setCreatedAt($data['created_at']);
}
if (!empty($data['new_data'])) {
$previousNewData = unserialize($data['new_data']);
$currentNewData = $this->getNewData(false);
$currentNewData = $this->_mergeNewDataRecursive($previousNewData, $currentNewData);
$this->setNewData(serialize($currentNewData));
}
return $this;
}
I've checked $currentNewData
in DB, and it is a very simple and light object, with just some properties... so I suspect problem must be with that _mergeNewDataRecursive()
previous line, but I am not sure which part of the checkout request is consuming so much memory
Any ideas?