Skip to main content

nginx "accept4() failed (24: Too many open files)"

Comments

3 comments

  • cPRex Jurassic Moderator
    Hey there! The "nobody" account wasn't available for SSH access because that user typically doesn't login and perform work, so the shell is set to nologin. Here's the output of the /etc/passwd file from an example system showing this: # grep nobody /etc/passwd nobody:x:99:99:Nobody:/:/sbin/nologin
    Nginx does indeed run as nobody just like Apache. To check a user's limits without shell, you can assign them a temporary session with this command. here's what I see on my personal machine: # su - nobody -c 'ulimit -Hn' -s '/bin/bash' 4096
    Can you try that to see if the values are now set how you expect?
    0
  • harmonypersechino5348
    Thank you for the reply. Yes it seems that the values set in /etc/security/limits.conf should resolve this now. [root@home ~]# su - nobody -c 'ulimit -Hn' -s '/bin/bash' 30000
    0
  • cPRex Jurassic Moderator
    Great - I'm glad you were able to come up with a good solution!
    0

Please sign in to leave a comment.