symfony - Export of large amounts of data with JMSSerializerBundle -
if try export large amounts of data "jmsserializerbundle" following error.
fatalerrorexception: error: allowed memory size of 134217728 bytes exhausted (tried allocate 1332351 bytes) in /var/www/app/trunk/vendor/symfony/symfony/src/symfony/component/httpkernel/datacollector/datacollector.php line 27
if export few records bundle, works fine.
$format = 'json'; $serializer = \jms\serializer\serializerbuilder::create()->build(); $serializer->serialize($data, $format, serializationcontext::create()->enablemaxdepthchecks());
the count of array $data 1917
how can handle issue?
try somewhere in script a:
echo ini_get('memory_limit'); // see how memory have
and update memory_limit settings in php.ini file. restart server , try again.
Comments
Post a Comment