Nginx+PHP-FPM intermittent blank page
Hello, I been suffering with this problem for a few days on a new server, some times like 1 or 2 times a day the Home page of wordpress shows a blank page with a 500 error (only visible from Chrome console) and it stays like that for a couple of minutes where not even a hard refresh (ctrl+shift+R) seems to work, but eventually it comes back to normal. the only way to quickly fix it is to stop nginx, delete nginx cache at /var/cache/nginx/ and start nginx again.
The server is a CentOS 6.5, nginx/1.6.2, php 5.3.3 (php-fpm).
my site conf:
(maybe is a little tweaked from fail fix attempts but still functional 99% of the time)
The same error happens on a few selected pages but not in the post pages inside wordpress, so even when the homepage is blank the rest of the site works ok.
I use the same conf on other servers and websites but this is the only one causing me trouble, the main difference is this website has a lot more traffic (2k+ per hour).
I been looking around for days but nothing seems to solve it, now about the pages where the error occur this pages read a TXT file with a “cached version of the page” which is refreshed/rewritten every 2 minutes, this help us to load super fast the homepage (and some internal pages) which usually take a few seconds more to load without the “cache” text file.
Note: We use CloudFlare but the error shows even if I use my hosts file to connect directly to the server (no caching in the middle) my PC <–> Nginx
Any ideas or suggestions would be really helpful.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.