How do you debug a white screen of death?

Permalink
I have a WSOD which happens frequently and the temporary "cure" is to clean the cache.

The are no errors in the error logs, which may relate to this.

There's nothing in the "Database query log"

What are the best steps (Other than just KNOWING what the problem is, because you've seen it before)

Conkreet
 
mesuva replied on at Permalink Best Answer Reply
mesuva
It's always tricky, but my advice would be for white screen:

- check the source of the white screen. If you actually get html output, see if there's a particular part of the output it chokes on
- if it's an empty response, this is more about PHP or the webserver itself dieing or crashing on the request.
- the next step is then to look at a higher level than the website itself, so have a look at the logs that might be available on your webhosting account. Check to see if any resource limits are being hit, in particular memory limits
- take note of particular urls it crashes on and the time, and then ask your host to see if they can identify the problem, often they can have a look through logs on the server that you might not have direct access to. They can also looks to see if resources are the problem. I have seen cases where Apache would segfaults on particular requests, something that could only be fixed by the host making updates themselves.
- Try changing the PHP version, some versions do have bugs or modules that cause crashes, changing the PHP version to something else often works around such problems.
- Since you've mentioned caching, I've also seen one or two sites crash while caching was on as well as apc an/or opcache modules were enabled. Swapping PHP versions also can help avoid any bugs with particular versions of modules.

What you normally can rule out with white screen errors that are intermittent:
- If it was a PHP error, you'd be seeing either error messages or half complete pages
- If it was a MySQL error, you'd see error messages or a message that the site can't connect
- If it was an issue with .htaccess files or other config, the error wouldn't likely be intermittent, and you'd probably get a 500 error (although I have seen on some servers a 500 as a white screen, unlikely though if it's intermittent).
- If it's a mod security issue, that's nearly always where you get unexpected 403 forbidden messages (or sometimes 404s)
- If it's a network problem, you're much more likely to see long loading times and then the browser throw a message about not being able to connect.

Don't rule out that's it's simply a bug or issue with the server - provide lots of detail to your host as to what they should look for and ask them to investigate.
Conkreet replied on at Permalink Reply
Conkreet
Thanks for your reply. I'n my case, I THOUGHT^ the screen was white, but actually had the default concrete5 background. Viewing the source helped my solve my issue.

Thank you very much!