Microcache will offer a WSOD after a while

Events happening in the community are now at Drupal community events on www.drupal.org.
bangkpow's picture

I'm serving cached version to all anonymous users. I'm kind of using it as a lazy man's varnish drop-in, it works great except it will offer a nice WSOD from time to time, and exclusively for the website.com front page.
I don't know why or when, but it looks like it depends on how busy the site is. The more anon users on the site, the faster the frontpage will wsod.

I've not found any errors in nginx or php logs, http response is 200.
Where in microcache configuration should I start looking?
I'm using Perusio's nginx config, nginx/1.2.5, pressflow6

fastcgi_microcache_zone.conf

fastcgi_cache_path /var/cache/nginx/microcache levels=1:2 keys_zone=microcache:5M max_size=1G inactive=2h loader_threshold=2592000000 loader_sleep=1 loader_files=100000;

microcache_fcgi.conf

fastcgi_cache microcache;
fastcgi_cache_key $host$request_uri;

fastcgi_cache_valid 200 301 60m;
fastcgi_cache_valid 302 3m;
fastcgi_cache_valid 404 10s;

fastcgi_cache_use_stale error timeout invalid_header updating http_500;
fastcgi_ignore_headers Cache-Control Expires;
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
add_header X-Micro-Cache $upstream_cache_status;
expires epoch;
fastcgi_cache_lock on;
fastcgi_cache_lock_timeout 3000; # in miliseconds.

Comments

You may want to begin by

dyardley's picture

You may want to begin by troubleshooting here - http://drupal.org/node/158043 It's possible your server isn't logging errors properly so nothing appears in the logs. WSOD usually indicates an exhaustion of resources or reaching a timeout in php. Use the devel module to check memory usage/query count (use summary mode) on the frontpage.

The only way to discover the limits of the possible is to go beyond them into the impossible.

The problem is elsewhere

perusio's picture

Can you repeat the problems without the microcache. This could be a timming issue on the response read timeout.

Mind you, Nginx doesn't send WSOD pages unless the backend sends them first.

It does look like the problem

bangkpow's picture

It does look like the problem is elsewhere. I've been trying various fastcgi_cache_lock_timeout settings and even fastcgi_cache_lock off, it didn't help.

SOLVED

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: