a proxy_module question ,maybe a bug?
村长
u_can at 163.com
Fri Mar 22 16:20:26 UTC 2019
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+
server {
listen 80;
server_name ~^([^.]+)\.abc\.com$;
set $sub $1;
location / {
proxy_pass https://172.22.207.56/;
proxy_redirect https://172.22.207.56/ /;
proxy_set_header Host $sub.abc.com;
proxy_cache $sub.abc.com;
}
}
the nginx.conf is:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 4096;
multi_accept on;
use epoll;
worker_aio_requests 256;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 2048;
server_tokens off;
server_names_hash_bucket_size 128;
server_names_hash_max_size 512;
server_name_in_redirect on;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Proxy Settings
##
proxy_buffering on;
proxy_buffer_size 512k;
proxy_buffers 32 512k;
proxy_busy_buffers_size 512k;
proxy_request_buffering on;
proxy_cache_valid 200 6h;
proxy_cache_lock on;
proxy_cache_lock_timeout 60s;
proxy_cache_lock_age 300s;
proxy_cache_use_stale updating error timeout invalid_header http_404 http_500 http_502 http_503 http_504;
proxy_cache_revalidate on;
proxy_connect_timeout 15;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
proxy_intercept_errors off;
proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie Vary;
proxy_hide_header Cache-Control;
proxy_hide_header Set-Cookie;
proxy_hide_header Expires;
proxy_hide_header X-Accel-Expires;
include /etc/nginx/sites-enabled/*;
}
I used wget to download every subsite's index page, in order to active the cache,per 6 hour , crontab。 just like this:
* */6 * * * /usr/bin/wget -t 1 -qi /root/.script/linklist-80.wget -O /dev/null
when I mannually type the command first:
wget -t 1 -qi /root/.script/linklist-80.wget -O /dev/null
everything is good. about 130minutes.
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
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
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
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
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
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
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
...
until entire disk full.
what's wrong with my config files ? or what's wrong with nginx?
潘永华
手机: 13166322138
邮箱: u_can at 163.com
网站: http://www.panswork.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20190323/fe01296d/attachment.html>
More information about the nginx
mailing list