I'm running a shoutcast v1 streaming server on a CentOS box. When I start the server as root, I can stream to 1200-1300 clients without a problem.
However, when I run the server as a different user (ccuser) the shoutcast server freezes when the connections reach to ~1019 something.
I have already edited /etc/security/limits.conf with the appropriate setting for both root & ccuser, and after a reboot, ulimit -a confirms it:
root@nsxxxxxx ~/monitoring # su - ccuser
-bash-4.1$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 515170
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 16384
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
I'm guessing that there is some other safeguard/setting that prohibits normal users to have more than ~1000 connections on a single port. Anyone has any ideas?
Each connection is an open socket, each socket is a file, -> therefore that user has file limits restricted to 1024 open files.
Actually i think your pam is enforcing to use /etc/security/limits.d/90-nproc.conf which overrides your set soft limit put up in limits.conf.