2

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?

  • 1
    Check your pam.d It is most likely overrides the settings with this rule /etc/security/limits.d/90-nproc.conf – Danila Ladner May 7 '13 at 21:34
3

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.

| improve this answer | |
  • Yeah, pam was ovveriding the nproc limit for everyone except root (setting it back to 1024). I've changed that, Have to wait till the next maintenance timeframe for a reboot and see if it works. Cheers – Iraklis May 7 '13 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.