Skip to content
Advertisement

Too many open files raised by supervisord?

I use wrk to test web API service managed by supervisor on ubuntu 16.04. have error “too many open files”, but i have set system config

/etc/security/limits.conf
*           soft    nofile  65535
*           hard    nofile  65535

still have error “too many open files”

I found supervisord is belongs to root and cat /proc/PID/limits

Max open files            1024                 4096                 files

so, add root limit settings to limits.conf like below

root        soft    nofile  65535
root        hard    nofile  65535

after restart supervisord it’s effected (cat /proc/PID/limits, got 65535) but supervisord exit soon after, and auto start with limits 1024.

Jul 12 18:55:53 adhost supervisord[10866]: Error: Another program is already listening on a port that one of our HTTP servers is configured to use.  Shut this program down first before starting supervisord.
Jul 12 18:55:53 adhost supervisord[10866]: For help, use /usr/bin/supervisord -h
Jul 12 18:55:53 adhost systemd[1]: supervisor.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 12 18:55:53 adhost supervisorctl[10871]: Shut down

reference: ubuntu – too many open files?

Advertisement

Answer

I resolved by sudo supervisorctl shutdown should’t kill P directly

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement