Max open files 1024 у nginx: master process

Vladislav Prodan universite на ukr.net
Пт Мар 11 13:47:30 UTC 2016


Здравствуйте. 

Проблема с лимитом открытых файлов в 1024 

# ps -auxwww | grep nginx 
root      2139  0.0  0.0  31860  2512 ?        Ss   05:42   0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf 
www-data  2140  0.0  0.0  36420  8212 ?        S    05:42   0:00 nginx: worker process 
www-data  2141  0.0  0.0  36116  7132 ?        S    05:42   0:00 nginx: worker process 
www-data  2142  0.0  0.0  36116  7132 ?        S    05:42   0:00 nginx: worker process 
www-data  2143  0.0  0.0  36116  7132 ?        S    05:42   0:00 nginx: worker process 
www-data  2144  0.0  0.0  36116  7132 ?        S    05:42   0:00 nginx: worker process 
www-data  2145  0.0  0.0  36116  7132 ?        S    05:42   0:00 nginx: worker process 
www-data  2146  0.0  0.0  36116  7132 ?        S    05:42   0:00 nginx: worker process 
www-data  2147  0.0  0.0  36116  7132 ?        S    05:42   0:00 nginx: worker process 
root      2196  0.0  0.0  13972  2212 pts/1    S+   05:45   0:00 grep nginx 

# cat /proc/2139/limits 
Limit                     Soft Limit           Hard Limit           Units 
Max cpu time              unlimited            unlimited            seconds 
Max file size             unlimited            unlimited            bytes 
Max data size             unlimited            unlimited            bytes 
Max stack size            8388608              unlimited            bytes 
Max core file size        0                    unlimited            bytes 
Max resident set          unlimited            unlimited            bytes 
Max processes             128495               128495               processes 
Max open files            1024                 4096                 files 
Max locked memory         65536                65536                bytes 
Max address space         unlimited            unlimited            bytes 
Max file locks            unlimited            unlimited            locks 
Max pending signals       128495               128495               signals 
Max msgqueue size         819200               819200               bytes 
Max nice priority         0                    0 
Max realtime priority     0                    0 
Max realtime timeout      unlimited            unlimited            us 


# cat /proc/sys/fs/file-max 
3289412 

#cat /etc/security/limits.conf 
* soft nofile 16384 
* hard nofile 16384 

nginx   soft    nofile      10000 
nginx   hard    nofile      30000 

mysql   soft    nofile  102400 
mysql   hard    nofile  102400 
mysql   soft    nproc   16384 
mysql   hard    nproc   16384 


Debian 8.3 x64 

# nginx -V 
nginx version: nginx/1.8.1 
built by gcc 4.9.2 (Debian 4.9.2-10) 
built with OpenSSL 1.0.1k 8 Jan 2015 
TLS SNI support enabled 
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-http_spdy_module --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -Wl,--as-needed' --with-ipv6 



-- 
Vladislav V. Prodan 
System & Network Administrator 
support.od.ua 
----------- следущая часть -----------
Вложение в формате HTML было извлечено…
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20160311/220fd1a9/attachment.html>


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