Question

I've just created a very simple, one-module application using Zend Framework 2.

I've set up the autoloading, the routes, etc., but when trying to connect to this test application, I wait some MINUTES and then I get back a blank page.

The apache error log says:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 33817602 bytes) in C:\Program     Files\626Suite\application\library\Zend\ServiceManager\ServiceManager.php on line 339

or

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 49141298 bytes) in C:\Program Files\626Suite\application\library\Zend\ServiceManager\ServiceManager.php on line 301

or

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 179873796 bytes) in C:\Program Files\626Suite\application\library\Zend\ServiceManager\Di\DiServiceFactory.php on line 106

but I really cannot understand what is going wrong here, there is nothing that would account for using 128MB of ram for a simple "hello world" controller.

I could also post my configuration, should it be useful, just say so.

Any idea of what could be causing this problem?

Was it helpful?

Solution

Answering to myself 'cause, in the end, I found the problem:

the main view was calling an undefined route, thus triggering an Exception, and the memory overflow was caused by XDebug, which wasn't properly configured and was trying to generate so much output that it exhausted all the available memory.

Correctly configuring XDebug solved the problem and the Exception was properly shown, instead of a white screen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top