nginx crash

António P. P. Almeida appa at
Wed Nov 23 20:21:35 UTC 2011

On 23 Nov 2011 12h29 WET, mdounin at wrote:

> Hello!

>> I'm having a similar issue. The php-fpm workers stop responding and
>> since the FCGI cache lifetime is 15s I get a bunch of SEGVs on the
>> cache manager.
> By "lifetime" you mean "fastcgi_cache_path ... inactive=15s"?

Nope. I mean this:

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

## For 200 and 301 make the cache valid for 30s.
fastcgi_cache_valid 200 301 30s;

Sorry it's 30s not 15.

> If yes, than you may want to change your configuration: this isn't 
> going to work well as nginx uses "inactive" as a guard against 
> stale cache entry locks (left by crashed workers, if any).  It 
> was never expected to be lower than time required to fetch 
> a resource from an upstream, and setting it to lower expected to 
> cause problems.
> If no, you may want to provide more details.  (Ideally I would 
> like to see full debug log showing the crash, the "ignore long 
> locked inactive cache entry" alert and some time before it, but I 
> understand it would be hard to obtain unless you are able to 
> reproduce the problem at will.)

I'll try to debug it, but it's not reproducible at will.

> Recently posted patch series[1] addresses major part of the 
> problem: it resolves deadlock after such crashes.  It would be 
> fine to resolve the crash itself too, but I wasn't yet able to 
> trace the problem cause (unless it's caused by too low inactive 
> time, which is mostly a configuration problem, see above).

Are you guys planning a new dev release or perhaps it's better for me
to apply the patches and rebuild me debian package, since it will take
a few days for a new dev release that incorporates those patches?

--- appa

More information about the nginx-devel mailing list