I got this issue when creating the customer in magneto 2.
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /vendor/magento/framework/Model/ResourceModel/Db/VersionControl/Snapshot.php on line 47
due to this reason, I increased the memory limit up to 8 GB. but the issue remains.
/**
* Register snapshot of entity data, for tracking changes
*
* @param MagentoFrameworkDataObject $entity
* @return void
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
*/
public function registerSnapshot(MagentoFrameworkDataObject $entity)
{
$metaData = $this->metadata->getFields($entity);
$filteredData = array_intersect_key($entity->getData(), $metaData);
$data = array_merge($metaData, $filteredData);
$this->snapshotData[get_class($entity)][$entity->getId()] = $data;
}
issue raised in this line $data = array_merge($metaData, $filteredData);
vendor/magento/framework/Model/ResourceModel/Db/VersionControl/Snapshot.php
how to resolve this issue
3
Answers
@Kashif answer help me a lot.
But none of the options not worked for me.
Problem solved.
My server is nginx. It memory limit defined in /etc/nginx/magento.conf
open the file and search
inside the below block
after found that line, the memory limit has to set as 6144M
fastcgi_param PHP_VALUE "memory_limit=6144M n max_execution_time=600";
after that, it works fine.
you able to find how much memory limit set in your Magento projects via debug log.
make log with ini_get('memory_limit');
hope this helps you all.
Try this
Allowed memory size of 792723456 bytes exhausted (tried to allocate 184320 bytes)
https://magento.stackexchange.com/a/209993/49715
OR
follow full link here
https://magento.stackexchange.com/questions/209976/magento-2-2-2-allowed-memory-size-of-792723456-bytes-exhausted-tried-to-alloc/209993#209993