I’m using the Symfony2 Framework with Doctrine using a mysql database, when running a Symfony command on the command line such as …
/path/to/php app/console myCommand
This command is to update loads of records (about 35,000+) and I get a memory exhaustion at 1Gb, is there a better and probably more efficient way to run these commands so I dont get this issue?
I could increase the memory limit but ultimately this is going to fail again at some point.
Thanks in advance
Try using batch processing To handle the updates in chunks.
http://docs.doctrine-project.org/en/2.1/reference/batch-processing.html