0

I am running Symfony3 with Doctrine and Sonata Admin. I don't think I need to get into details about the project. The problem is that while I am editing one of my big entities I get an:

HTTP ERROR 500

When I cut down some properties of the Entity, I get an:

OutOfMemoryException in FileProfilerStorage.php line 158: Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 5371354 bytes)

Tried:
1. Out of memory error in symfony failed
2. Changing php.ini memory_limit from 128M to 4048M (Step by step, I know it is too much), everything failed
3. php -d memory_limit=1024M app/console cache:clear --env=prod, various values, failed
4. also php bin/console cache:clear failed

Then, what's next?

Community
  • 1
  • 1
StLia
  • 1,012
  • 2
  • 12
  • 26
  • When you changed `memory_limit` to `4048M` what error message it threw? I guess you changed it for PHP CLI or you haven't restarted your web server. – martin Oct 17 '16 at 15:37
  • I didn't got any errors.. I haven't restarted the web server, but even now that I did, nothing changed. And I am definitely editing the correct php.ini.. @Martin – StLia Oct 17 '16 at 15:48
  • So when you didn't get any errors the problem is solved, right :)? – martin Oct 17 '16 at 15:55
  • Oh, you meant that errors. I though you were talking about errors in the console. Anyway, I still got the same errors when trying to edit a Entity from localhost:8000/admin – StLia Oct 17 '16 at 16:23
  • My point is that if you think you changed the limit to 4GB and the error is still `Error: Allowed memory size of 134217728 bytes` then you didn't change the limit. – martin Oct 17 '16 at 16:39
  • I didn't verified the memory with phpinfo() yesterday. But I did it today and it is changed to 4048M. Also today I don't have the same problem.. I didn't even turned off my laptop.. I guess that bug is hiding somewhere. – StLia Oct 18 '16 at 07:51

0 Answers0