I'm running an Icecast 2.4.3 server on a CentOS 7. When I have a lot of listeners, I receive these errors and everything stops working:
[2017-06-21 18:56:37] WARN connection/_accept_connection accept() failed with error 24: Too many open files
It's running on "ices" user:
sudo -u ices /opt/icecast/bin/icecast -c /opt/icecast/etc/icecast.xml -b
Or running as root with "changeowner" option to "ices" user.
I set limits.conf:
ices hard nofile 65536
ices soft nofile 65536
From ulimit:
[root@orfeu inweb]# su ices
[ices@orfeu inweb]$ ulimit -n
65536
But when I check the PID, I get:
tcp 0 0 <IP>:8000 0.0.0.0:* LISTEN 21650/icecast
[root@orfeu inweb]# cat /proc/21650/limits
Limit Soft Limit Hard Limit Units
...
Max open files 1024 4096 files
...
How can I fix this, to enforce 65536 file descriptors? Thank you.