worker_connections exceed open file resource limit

bee.lists bee.lists at
Tue Mar 9 10:29:02 UTC 2021

Hi there.

It is development.  I’ve been running 1024 for over 10 years and now there’s a restriction on 256 workers, and I don’t know why.  It seems to be set quite low. Given the fact this is a new warning, developers that have increased this setting have been wrong all this time?

I’ll take a look at the OS specifics, but I’ve set that to 1024 and it didn’t take.  I will have to review.

Thanks for the response.  

> On Mar 8, 2021, at 8:39 PM, Maxim Dounin <mdounin at> wrote:
> For production use, you should either set worker_connections below 
> the limit, or raise the limit.  Without this, nginx might end up 
> in a situation when it cannot accept new connections due to 
> maxfiles limit being reached by the process, and cannot do 
> anything with this.  And hence nginx prints the warning that your 
> system is misconfigured.
> Also, 1024 is somewhat low for any serious production use, so you 
> probably want to raise the limit.  In simple cases just "ulimit 
> -n" should be enough (or you can use worker_rlimit_nofile as an 
> easier alternative,  In 
> more complex cases you might need to adjust kernel limits, such as 
> kern.maxfiles and kern.maxfilesperproc.  Some macOS-specific 
> instructions can be found, for example, at 
> (just the first link 
> from Google "macos maxfiles", looks reasonable).
> On the other hand, given macOS, this is highly unlikely going to 
> be a production use, so you can safely ignore the warning.

Cheers, Bee

More information about the nginx mailing list