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 \Magento\Framework\DataObject $entity
* @return void
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
*/
public function registerSnapshot(\Magento\Framework\DataObject $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
What solution we need to provide this.