ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

утечка коннектов?



Привет

Сегодня первый раз пронаблюдал в error.log следующее

2008/07/10 00:00:48 [alert] 81002#0: send() failed (64: Host is down)
2008/07/10 00:00:49 [alert] 81002#0: send() failed (64: Host is down)
2008/07/10 00:00:49 [alert] 81002#0: send() failed (64: Host is down)
2008/07/10 00:00:58 [alert] 81003#0: send() failed (64: Host is down)
2008/07/10 00:00:58 [alert] 81003#0: send() failed (64: Host is down)
2008/07/10 00:01:06 [alert] 81002#0: send() failed (64: Host is down)
2008/07/10 00:01:08 [alert] 81002#0: send() failed (64: Host is down)
2008/07/10 00:01:12 [alert] 81002#0: send() failed (64: Host is down)
2008/07/10 00:01:14 [alert] 81002#0: send() failed (64: Host is down)
2008/07/10 00:01:23 [alert] 81002#0: send() failed (64: Host is down)
2008/07/10 00:01:40 [alert] 81002#0: unexpected response for domain.com

После этих ошибок у nginx начался рост writting connections, дошёл минут за 45 до ~3100(обычно около 100 запросов/сек), после чего, похоже, воркер 81002 перестал отрабатывать коннекты.

немного позже делаю reload nginx'у

2008/07/10 04:09:19 [notice] 94838#0: signal 1 (SIGHUP) received, reconfiguring
2008/07/10 04:09:19 [notice] 94838#0: reconfiguring
2008/07/10 04:09:19 [notice] 94838#0: using the "kqueue" event method
2008/07/10 04:09:19 [notice] 94838#0: start worker processes
2008/07/10 04:09:19 [notice] 94838#0: start worker process 83197
2008/07/10 04:09:19 [notice] 94838#0: start worker process 83198
2008/07/10 04:09:19 [notice] 81002#0: gracefully shutting down
2008/07/10 04:09:19 [notice] 94838#0: signal 23 (SIGIO) received
2008/07/10 04:09:19 [notice] 81003#0: gracefully shutting down
2008/07/10 04:09:19 [notice] 94838#0: signal 23 (SIGIO) received
2008/07/10 04:09:19 [notice] 94838#0: signal 23 (SIGIO) received
2008/07/10 04:09:24 [notice] 81003#0: exiting
2008/07/10 04:09:24 [notice] 81003#0: exit
2008/07/10 04:09:24 [notice] 94838#0: signal 20 (SIGCHLD) received
2008/07/10 04:09:24 [notice] 94838#0: worker process 81003 exited with code 0
2008/07/10 04:09:24 [notice] 94838#0: signal 23 (SIGIO) received
2008/07/10 04:09:55 [notice] 81002#0: exiting
2008/07/10 04:09:55 [alert] 81002#0: open socket #5910 left in 4 connection
2008/07/10 04:09:55 [alert] 81002#0: open socket #28684 left in 5 connection
2008/07/10 04:09:55 [alert] 81002#0: open socket #15515 left in 7 connection
................
2008/07/10 04:09:55 [alert] 81002#0: open socket #32122 left in 3230 connection
2008/07/10 04:09:55 [alert] 81002#0: open socket #35106 left in 3231 connection
2008/07/10 04:09:55 [alert] 81002#0: open socket #3034 left in 3237 connection
2008/07/10 04:09:55 [notice] 94838#0: signal 20 (SIGCHLD) received
2008/07/10 04:09:55 [alert] 94838#0: worker process 81002 exited on signal 11
2008/07/10 04:09:55 [notice] 94838#0: signal 23 (SIGIO) received
2008/07/10 04:09:55 [notice] 94838#0: signal 23 (SIGIO) received

grep -c "81002#0: open socket" error.log
3140

корок как обычно нет, хотя cwd у воркера верный и в директорию с профайлами с такими же правами/владельцем воркер мог писать

kern.maxfiles: 100000
kern.maxfilesperproc: 40000

у nginx
worker_processes  2;
worker_rlimit_nofile 40000;
worker_connections  8000;
open_file_cache          max=32000  inactive=10800s;

проксирование вида proxy_pass http://$domain$uri; $domain статический и задан выше в конфиге.

nginx version: nginx/0.6.30
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt=-I /usr/local/include --with-ld-opt=-L /usr/local/lib --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --user=www --group=www --with-debug --with-google_perftools_module --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-log-path=/var/log/nginx-access.log --with-http_realip_module --with-http_stub_status_module --with-http_sub_module
+ патч из http://www.lexa.ru/nginx-ru/msg17144.html

после релоада оба новых воркера нормально отрабатывают коннекты. До релоада странички либо не открывались, либо открывались медленно.



 




Copyright © Lexa Software, 1996-2009.