500 internal server error and wp super cache plugin
It was really tough time finding out why server was giving 500 internal server error.
Strangely, there is no error or warning initially but after some time (i.e. a day or two) I am getting 500 error.
When I manually restart php-fpm, everything is okay till a day and after that I again need to restart.
I am using php-fpm, apc, nginx, varnish, Wordpress, wp super cache on Ubuntu 11.10 64bit with Linode 2048.
After searching a lot, there were many voices regarding timeout and buffer issues but in my case I found out that WP Super Cache WordPress plugin was causing problem!
If I disable the plugin, everything goes well!!
But I don't want to go without cacheing.
Did anybody face similar issue before?
php-fpm error log :
[06-Jul-2012 18:57:15] WARNING: [pool www] child 13779 exited on signal 11 (SIGSEGV) after 20370.644877 seconds from start
nginx error log :
2012/07/06 18:57:20 [error] 3848#0: *34 readv() failed (104: Connection reset by peer) while reading upstream, client: 115.112.82.103, server: mydomain.com, request: "GET /the-media/?cat=pendulum HTTP/1.1", upstream: "fastcgi://unix:/dev/shm/php-fpm-
WP Super Cache rules are as follows :
WP Super Cache rules.
Designed to be included from a 'wordpress-ms-…' configuration file.
Enable detection of the .gz extension for statically compressed content.
Comment out this line if static gzip support is not compiled into nginx.
gzip_static on;
set $supercacheuri "";
set $supercachefile "$documentroot/wp-content/cache/supercache/${httphost}${uri}index.html";
if (-e $supercachefile) {
set $supercacheuri "/wp-content/cache/supercache/${http_host}${uri}index.html";
}
If this is a POST request, pass the request onto WordPress.
if ($request_method = POST) {
set $supercacheuri "";
}
If there is a query string, serve the uncached version.
if ($query_string) {
set $supercacheuri "";
}
Logged in users and those who have posted a comment get the non-cached version.
if ($httpcookie ~* commentauthor|wordpressloggedin|wp-postpass) {
set $supercacheuri "";
}
Mobile browsers get the non-cached version.# Wastes CPU cycles if there isn't a mobile browser WP theme for the site.if ($httpxwap_profile) { set $supercacheuri "";
}
if ($http_profile) {
set $supercacheuri "";}
if ($httpuseragent ~* (2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800)) {
set $supercacheuri "";
}
if ($httpuseragent ~* (w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-)) {
set $supercacheuri "";
}
Stop processing if the supercache file is valid.
if ($supercacheuri) {
rewrite ^ $supercacheuri break;
}
Thanks in advance.