0

I am having problem with WSOD on my site. I have a lot of modules so my php execute time is 60s and allocated memory is 512MB. This error comes not regularly this is the biggest problem, and I cannot reproduce it.

The http request at that time is 200 what means its ok, my memory and processor usage is fine. But I have no error on php and apache2 level that means something dies even before it could log anything. If I try to debug it and put code in the index.php the problem dissapears and the site is visible, with the apache restart as well.

Other strange thing, I have a test copy of the site, on the same server. If I load the test site the problem dissappears like on apache restart.

I have this in my settings.php, and index.php file as well.

error_reporting(E_ALL);
$conf['error_level'] = 2;
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

The error reporting is setted on php and server level as well. Still no sign of errors and solutions.

Thanks, Adam

4

1 Answer 1

1

Your best bet would be to take a local copy of your site and leverage XHProf (there's a module for that) to determine what exactly is causing your site to throw a WSOD (memory leak? too many DB calls? etc.).

That being said, you should probably start by identifying which modules aren't absolutely required for your site and uninstall them completely. Remember that any module enabled is being parsed on each page load and this causes unnecessary memory consumption. One way to mitigate this, though, is to make sure you have APC enabled on the server, or better, that you're running PHP 5.5.x which comes with Zend Opcode cache built-in (it might be more involved, though, for compatibility reasons).

Then, you should definitely try to find why you need as much as 512M of PHP memory to run the site. This is way too much for regular use cases. Part of it comes from the fact that you must have too many modules indeed, but it could also be caused by too many (uncached) Views and/or Panels or anything that is taking too long to load.

I'd recommend that you install the Memory Profiler module prior to getting to XHProf profiling (if you're not familiar with this already). It's a quick and lightweight way to determine paths that are possible culprits.

1
  • I just installed memcache, and varnish on the server and the site to work together and see wath's going to happen in the following days. Since my site is very huge and custom I need a lot of modules. I took in account that to check everything with XHProf and I will do it by the next week. Thanks for your answer and helpful advices.
    – Adam
    Feb 28, 2014 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.