Symfony 2 dies and gives me blank page. Disclaimer: I hate blank pages. Anyway, how do I find out what went wrong; why it died; why there's no error?
Checking the dev.log
it gives me useless info:
[2011-08-05 08:41:33] doctrine.DEBUG: UPDATE accTransactions SET report_id = ? WHERE id = ? ([8163,2941852])
[2011-08-05 08:41:33] event.DEBUG: Notified event "kernel.view" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelView".
[2011-08-05 08:41:33] event.DEBUG: Listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelView" stopped propagation of the event "kernel.view".
[2011-08-05 08:41:33] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse".
[2011-08-05 08:41:33] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\SecurityBundle\EventListener\ResponseListener::onKernelResponse".
[2011-08-05 08:41:33] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\FirePHPHandler::onKernelResponse".
[2011-08-05 08:41:33] event.DEBUG: Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\CacheListener::onKernelResponse".
[2011-08-05 08:41:33] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse".
[2011-08-05 08:41:35] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse".
The php_error.log
and other do not have an error.
I'm running an update on a large table, and doing about 1500+ queries per request (taking about 15sec). I assume the death of PHP has something to do with Doctrine2 then. It's very unstable, in that it start to die when the number of transactions seems to increase... I have to admin I expected much more from an ORM, not just blank deaths.
Is there a db log file or something that can give me an error? Anything to work with besides doing 1 transaction at a time, because that'll take 13,333 hours... It's a very basic update (just adding that one relation) if you look at the first log entry.
I'm running PHP 5.3.2 with APC
I've also noticed that when the function gets to the flush command at the bottom, it successfully executes it. Thus, I assume it's only SF2 now that does not render the view successfully?
If you are batch processing in Doctrine2 then your entity manager will be growing and you are breaching you PHP memory limit.
http://www.doctrine-project.org/blog/doctrine2-batch-processing.html
You are creating thousands of objects and this is growing with each cycle.
You need to be careful when batch processing with an ORM that you eliminate memory leaks. An ORM is not always the best tool for this job but it CAN be used if you are careful with what you are doing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With