nginx "accept4() failed (24: Too many open files)"
I am getting the following error with nginx
I have came across
2022/01/26 03:54:03 [crit] 28222#28222: accept4() failed (24: Too many open files)
2022/01/26 03:54:03 [crit] 28222#28222: accept4() failed (24: Too many open files)
2022/01/26 03:54:04 [crit] 28222#28222: accept4() failed (24: Too many open files)
2022/01/26 03:54:04 [crit] 28222#28222: accept4() failed (24: Too many open files)
2022/01/26 03:54:05 [crit] 28222#28222: accept4() failed (24: Too many open files)I have came across
-
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 -
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' 300000 -
Great - I'm glad you were able to come up with a good solution! 0
Please sign in to leave a comment.
Comments
3 comments