I am getting the following error with nginx
I have came across https://support.cpanel.net/hc/en-us...e-the-number-of-open-files-allowed-for-Nginx- and made the changes however this did not fix the issue.
[root@home ~]# grep 'open file' /proc/$(pgrep -u root -f 'nginx: master')/limits
The file limit is still set low
[root@home ~]# ulimit -Hn
[root@home ~]# ulimit -Sn
I came across other websites saying that I need to add
/etc/security/limits.conf
As nginx.conf is currently being run as nobody then I presume I need to change that to
When trying to verify the changes I get the error
[root@home ~]# su - nobody -c 'ulimit -Hn'
How can I verify this is all I need to do?
Code:
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 https://support.cpanel.net/hc/en-us...e-the-number-of-open-files-allowed-for-Nginx- and made the changes however this did not fix the issue.
[root@home ~]# grep 'open file' /proc/$(pgrep -u root -f 'nginx: master')/limits
Code:
Max open files 99999 99999 files
[root@home ~]# ulimit -Hn
Code:
4096
Code:
1024
I came across other websites saying that I need to add
/etc/security/limits.conf
Code:
nginx soft nofile 10000
nginx hard nofile 30000
Code:
nobody soft nofile 10000
nobody hard nofile 30000
[root@home ~]# su - nobody -c 'ulimit -Hn'
Code:
This account is currently not available.
Last edited by a moderator: