a proxy_module question ,maybe a bug?

Maxim Dounin mdounin at mdounin.ru
Mon Mar 25 13:26:23 UTC 2019


Hello!

On Sat, Mar 23, 2019 at 12:20:26AM +0800, 村长 wrote:

> nginx version: nginx/1.10.3
> uname: Linux  4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
> VPS: Linode $5
> 
> 
> 
> I set about 900 subsite like this:
> 
> 
>     proxy_cache_path /var/cache/nginx/abc.com/aaa levels=1:2 use_temp_path=off keys_zone=aaa.abc.com:64k inactive=8h max_size=128m;
>     proxy_cache_path /var/cache/nginx/abc.com/bbb levels=1:2 use_temp_path=off keys_zone=bbb.abc.com:64k inactive=8h max_size=128m;
>     ...
>     the list is 900+

Just a side note: it is usually a bad idea to configure individual 
cache paths for each site, as it consumes much more resources than 
using a single cache for all sites.  Instead, consider using a 
single proxy_cache_path and add site identifier to 
proxy_cache_key.

[...]

> but when I type run it again at once, the nginx will go wrong in minutes:
> 
> 
> 2019/03/22 10:30:03 [alert] 6356#6356: ignore long locked inactive cache entry 3391b383577454e8dfb6337e060c1d22, count:1
> 2019/03/22 10:30:03 [alert] 6356#6356: ignore long locked inactive cache entry 3391b383577454e8dfb6337e060c1d22, count:1

The "ignore long locked inactive cache entry" alert indicates that 
nginx was trying to remove a cache entry, but failed to do this 
because the entry was locked.  This may be either result of a bug, 
or may happen if a worker process is killed or crashed.  That is, 
this may happen, e.g., if your server run out of memory at some 
point and OOM-killer killed an nginx worker process.  To find out 
what actually happened you may want to investigate error log 
before the first "ignore long locked" alert.

On the other hand, the first thing you may want to do is to 
upgrade - nginx 1.10.3 is rather old and no longer supported.  
Invesigating anything with nginx 1.10.3 hadly make sense.

[...]

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list