Open File Resource Limit?

General support questions
Post Reply
mevans336
Posts: 47
Joined: 2007/09/06 15:19:57
Contact:

Open File Resource Limit?

Post by mevans336 » 2014/10/15 18:28:18

Hello Experts,

I am trying to resolve an Nginx issue during boot where it reports:

Code: Select all

4096 worker_connections exceed open file resource limit: 1024
I have set the following in /etc/security/limits.conf and rebooted, but I still receive the error:

Code: Select all

* soft nofile 8192
* hard nofile 8192
We are running CentOS 6.5 x86_64 and AFAIK, this has always worked in the past.

Any advice or suggestions?

aks
Posts: 2894
Joined: 2014/09/20 11:22:14

Re: Open File Resource Limit?

Post by aks » 2014/10/16 18:18:41

Have you looked for <username_of_httpd>.conf in limits.d - from memory something like /etc/security/limits.d/ also some (foolish) people have been know to butcher limits.conf - like we used to do in the older releases of RH so it's worth looking in there too.

mevans336
Posts: 47
Joined: 2007/09/06 15:19:57
Contact:

Re: Open File Resource Limit?

Post by mevans336 » 2014/10/20 13:23:16

aks wrote:Have you looked for <username_of_httpd>.conf in limits.d - from memory something like /etc/security/limits.d/ also some (foolish) people have been know to butcher limits.conf - like we used to do in the older releases of RH so it's worth looking in there too.
The only thing in /etc/security/limits.d/ is a file called 90-nproc.conf. Here are the contents:

Code: Select all

# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     1024
root       soft    nproc     unlimited
Could that first line be the issue?

aks
Posts: 2894
Joined: 2014/09/20 11:22:14

Re: Open File Resource Limit?

Post by aks » 2014/10/20 19:08:24

Just add ulimit -n 65536 to the start script when ngix is starting - make sure that is passwd as the user ngix is starting as. That'll alliviate the problem, but it's not necessarily a good solution.

aks
Posts: 2894
Joined: 2014/09/20 11:22:14

Re: Open File Resource Limit?

Post by aks » 2014/10/20 19:09:02

Hmm, passwd should be passed in the above.

Post Reply

Return to “CentOS 6 - General Support”