Why the info 'A worker can handle no more than 1024 simultaneous connections' has been removed from http://nginx.org/en/docs/windows.html ?

Masseau Olivier Olivier.Masseau at inetum.com
Thu Nov 17 16:06:37 UTC 2022

Thanks ;)

Maybe it would be nice to add this info on the http://nginx.org/en/docs/windows.html  page.
Because without your answer I think I would never have been able to find this information :)

I'm aware that Nginx is not a good idea in production.
But I was asked to evaluate and give evidence from which point the  "not so good idead" starts to become a "really really bad idead" :p



On Wed, Nov 16, 2022 at 03:31:14PM +0000, Masseau Olivier via nginx wrote:

> Previous we could find this very important information on the "nginx 
> for Windows" page ( http://nginx.org/en/docs/windows.html
> ) :
> Known issues
> ...
> A worker can handle no more than 1024 simultaneous connections.
> ...
> Why has it been removed ?
> I struggled a lot understanding why increasing worker_connections 
> above 1024 was not working on Windows.

As you can see from the source code repository of the nginx.org site, the relevant item was removed along with the documentation of the poll event method being supported on Windows (introduced in nginx 1.15.9):

Added the "poll" method for Windows.

With the poll event method, as long as it is supported by the Windows version you are using (Windows Vista or later), nginx will use the WSAPoll() function, which, in contrast to select(), does not impose a hard-coded limit on the number of connections.
You'll have to use the "use poll;" in your configuration to instruct nginx to use the poll event method, see http://nginx.org/r/use for details.

Note though that with poll there might be other issues, such as failure to report connect() errors till the timeout expires (see https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/ for details; shouldn't be a major issue in case of nginx though, since errors while connecting to backend servers aren't expected to happen).

Also note that Windows isn't really designed as an efficient server platform, and nginx is not really designed to work on Windows.  Running nginx on Windows in production setups might not be a good idea.

Hope this helps.

Maxim Dounin
nginx mailing list -- nginx at nginx.org
To unsubscribe send an email to nginx-leave at nginx.org

More information about the nginx mailing list