Утечка сокетов в 0.8.21

Alex Vorona voron на amhost.net
Сб Дек 19 19:04:28 MSK 2009


Привет.

Сегодня наблюдал утечку сокетов в nginx
nginx -V
nginx version: nginx/0.8.21
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-file-aio --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_flv_module --with-http_realip_module 
--with-http_stub_status_module --with-pcre

7.1-RELEASE-p4

В err-логах [alert] 77645#0: *189558922 4000 worker_connections are not enough while 
connecting to upstream

В netstat -na 14k соединений в состоянии CLOSED, 4 воркера nginx.
Используется aio sendfile для мелкой статики, для крупной обычный sendfile, недавно был 
включен limit_rate + limit_rate_after

В changelog не нашёл изменений по утечке сокетов после 0.8.21. Обновление до 0.8.30 с теми 
же параметрами сборки ни к чему не привело - рост CLOSED в netstat -an продолжается, да и 
lsof показывает наличие ростущего количества CLOSED у воркеров 0.8.30.

Отключение limit_rate + limit_rate_after - проблема исчезает.



Подробная информация о списке рассылки nginx-ru