Symfony2 gives a blank page

Symfony 2 dies and gives me a blank page. Disclaimer: I hate blank pages. Anyway, how do I know what went wrong; Why did he die; why is there no mistake?

Checking dev.log gives me useless information:

 [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". 

php_error.log and others have no error.

I run the update on a large table and make about 1,500 requests per request (takes about 15 seconds). I assume the death of PHP has something to do with Doctrine2. This is very unstable as it starts to die when the number of transactions seems to increase ... I have to be an administrator, I expected a lot more from ORM, and not just from death.

Is there a db log file or something that might give me an error? Everything you need to work, in addition to performing one transaction at a time, because it takes 13,333 hours ... This is a very basic update (just adding this one relationship) if you look at the first entry in the log.

I am running PHP 5.3.2 with APC

I also noticed that when a function jumps to the flush command at the bottom, it successfully executes it. So, I assume that only SF2 now does not display the view successfully?

+6
source share
4 answers

If you do batch processing in Doctrine2, your entity manager will grow and you will break the PHP memory limit.

http://www.doctrine-project.org/blog/doctrine2-batch-processing.html

You create thousands of objects, and it grows with every cycle.

You must be careful when batch processing with ORM to eliminate memory leaks. ORM is not always the best tool for this job, but it can be used if you are careful what you do.

+2
source

try deleting these folders: - cache - logs

and reload the page.

+1
source

I think you should turn on and see your MySQL query log. On Debian Linux, you have to edit the /etc/mysql/my.cnf file and edit it to look something like

 [mysqld] # ... # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # As of 5.1 you can enable the log at runtime! general_log_file = /var/log/mysql/mysql.log general_log = 1 log_error = /var/log/mysql/error.log 

This way you can view it in real time tail -F /var/log/mysql/mysql.log

0
source

Try adding "cache: false" to twig in your configuration file for your environment. Decide me.

0
source

Source: https://habr.com/ru/post/894358/


All Articles