Too many open files when reloading - Debian Jessie

beatnut nginx-forum at
Wed Aug 24 10:59:22 UTC 2016

My nginx was build from source on Debian Jessie

 --prefix=/etc/nginx --modules-path=/usr/lib/nginx/modules
--sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/
--http-uwsgi-temp-path=/var/cache/nginx/tmp/uwsgi --with-http_v2_module
--with-http_stub_status_module --with-http_realip_module
--with-http_ssl_module --with-http_secure_link_module
--with-http_geoip_module=dynamic --user=nginx --group=nginx

worker_rlimit_nofile 8192;

As root
 ulimit -n 65536

When starting /etc/init.d/nginx start - everything is ok

lsof -u nginx|wc -l

, but when reloading i get  
[emerg] 18662#0: open() "/var/log/nginx/access/foo.log" failed (24: Too many
open files)

lsof -u nginx|wc -l 

Master proces
cat /proc/21101/limits
Max open files            1024                 4096                 files

One of workers
cat /proc/21102/limits

Max open files            8192                 8192                 files

I can't figure why this problem   occurs when reloading and not when
starting. How to avoid it?

Posted at Nginx Forum:,269150,269150#msg-269150

More information about the nginx mailing list