А РХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
memory leak by nginx
To : nginx-ru@xxxxxxxxx
Subject : memory leak by nginx
From : Vitaliy Okulov <vitaliy.okulov@xxxxxxxxx >
Date: Thu, 29 Jan 2009 13:18:04 +0300
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=2ETA9+7VLpYIxQHuOGwS0oYb+cL8C9cxyOveDgN305w=; b=r98S6+YE7jG314CK9W2vWvL5Fe6GfSJs/IZezl4GGvDMDCX2on2HPc7nbGElBvAw36 Q/ijeADIpYf5YM6ldb5mdYeh9eynHQy13ixLi7FbFqsy6ZAhDqCuoZCGC5dtZFN+cs72 /NV51ALphefQd/lT3MJg9xda/VhbzohXMaxts=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=NK9/B0064moGsZ+FwCQOJdnonDOH7EW8BaXeWWpj+4wcmrCCj0CKfkZKe+wJL1rOAh +smr9QllQxg+N/0PU6F5q8JIcylmuAO/dKum2Z/V6zGBsg+EjUHtgPbZiSpu1H+ZC2d7 Veia4zOZJpPm6m1vW/ETOxH7NMQM3W2PKvik4=
Обновился до nginx 0.6.34 c 0.6.32. Заметил утечки памяти на 1 сервере. ОС FreeBSD 6.3. Параметры сборки: nginx version: nginx/0.6.34 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 --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_addition_module --with-http_dav_module --with-http_flv_module --with-http_realip_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module
Клиентов на данном сервере мало, примерно 5-10 коннекто в секунду. Динамики нет, то есть обслуживается только статика. После рестарта nginx память освобождается. В dmesg есть информация: swap_pager_getswapspace(2): failed
pid 38158 (nginx), uid 80, was killed: out of swap space swap_pager_getswapspace(16): failed Так что проблема явно в nginx. Из особенностей могу отметить использование большой базы geoip адресов. В чем может быть проблема? Как ее решить?
Конфигурационный файл: user www; worker_processes 8; worker_rlimit_nofile 200000; #error_log logs/error.log; #error_log logs/error.log notice; error_log /var/log/nginx/error.log info;
#pid logs/nginx.pid; events { use kqueue; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; index index.shtml index.html;
log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; client_max_body_size 60m; #gzip on; error_page 404 /404.html;
error_page 500 502 503 504 /50x.html; include /usr/local/etc/nginx/upstream.conf; include /usr/local/etc/nginx/geoip.conf; include /usr/local/etc/nginx/vhosts.d/*.conf; server {
listen *:80; server_name xxx; location / { root /usr/local/www/nginx; index index.html index.htm index.shtml; } error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/local/www/nginx-dist; } location /nginx_status { stub_status on; access_log off; allow xxx;
deny all; } } }