Welcome! Log In Create A New Profile

Advanced

Too many open files when reloading - Debian Jessie

August 24, 2016 06:59AM
Hello,
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/nginx.pid --lock-path=/var/run/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/cache/nginx/tmp/client --http-proxy-temp-path=/var/cache/nginx/tmp/proxy --http-fastcgi-temp-path=/var/cache/nginx/tmp/fastcgi --http-scgi-temp-path=/var/cache/nginx/tmp/scgi --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

nginx.conf:
worker_rlimit_nofile 8192;

As root
ulimit -n 65536

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

lsof -u nginx|wc -l
3333

, 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
2776

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?
Subject Author Posted

Too many open files when reloading - Debian Jessie

beatnut August 24, 2016 06:59AM

Re: Too many open files when reloading - Debian Jessie

beatnut August 24, 2016 07:36AM

Re: Too many open files when reloading - Debian Jessie

B.R. August 24, 2016 03:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready