Welcome! Log In Create A New Profile

Advanced

Windows 1024 Connections Limit

Posted by Igal @ Lucee.org 
Igal @ Lucee.org
Windows 1024 Connections Limit
April 12, 2017 06:40AM
Is there a technical reason for the 1,024 Connections Limit on Windows?

http://nginx.org/en/docs/windows.html#known_issues

Surely the OS can handle many more connections than that.

This is not much of an issue with regular requests, but when you use
WebSockets you can run out of connections very fast.

Thanks,


Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Maxim Dounin
Re: Windows 1024 Connections Limit
April 12, 2017 03:00PM
Hello!

On Tue, Apr 11, 2017 at 09:37:46PM -0700, Igal @ Lucee.org wrote:

> Is there a technical reason for the 1,024 Connections Limit on Windows?
>
> http://nginx.org/en/docs/windows.html#known_issues
>
> Surely the OS can handle many more connections than that.

On Windows, nginx uses select() system call to handle connection
events. This syscall implies fixed-size bitmasks to pass file
descriptors from userland to kernel and back. Size of these
bitmasks can be only specified during compilation, and 1024 is the
value nginx uses for official binaries to balance between maximum
number of connections and unneeded overhead implied by large
bitmasks.

> This is not much of an issue with regular requests, but when you use
> WebSockets you can run out of connections very fast.

It is possible to recompile nginx with different value if you need
to, see http://nginx.org/en/docs/howto_build_on_win32.html.

On ther other hand, if you are using nginx in production I would
recommend to consider using Unix variants instead.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Igal @ Lucee.org
Re: Windows 1024 Connections Limit
April 12, 2017 07:50PM
Maxim,

On 4/12/2017 5:57 AM, Maxim Dounin wrote:
>
> On Windows, nginx uses select() system call to handle connection
> events. This syscall implies fixed-size bitmasks to pass file
> descriptors from userland to kernel and back. Size of these
> bitmasks can be only specified during compilation, and 1024 is the
> value nginx uses for official binaries to balance between maximum
> number of connections and unneeded overhead implied by large
> bitmasks.
>
> It is possible to recompile nginx with different value if you need
> to, see http://nginx.org/en/docs/howto_build_on_win32.html.
>
> On ther other hand, if you are using nginx in production I would
> recommend to consider using Unix variants instead.

Thank you very much for the explanation and recommendation,


Igal
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
B.R. via nginx
Re: Windows 1024 Connections Limit
April 13, 2017 10:00AM
Even though using nginx on Windows goes way over my head (even for
development) and/or seing WIndows as any kind of server, I read that
Windows Vista+ support the poll (well, actually WSAPoll
https://msdn.microsoft.com/en-us/library/windows/desktop/ms741669.aspx)
system call.
Since XP may now reasonably be called something of the past, would not it
be nice to go for it? No epoll, though.
---
*B. R.*

On Wed, Apr 12, 2017 at 7:42 PM, Igal @ Lucee.org <[email protected]> wrote:

> Maxim,
>
> On 4/12/2017 5:57 AM, Maxim Dounin wrote:
>
>>
>> On Windows, nginx uses select() system call to handle connection
>> events. This syscall implies fixed-size bitmasks to pass file
>> descriptors from userland to kernel and back. Size of these
>> bitmasks can be only specified during compilation, and 1024 is the
>> value nginx uses for official binaries to balance between maximum
>> number of connections and unneeded overhead implied by large
>> bitmasks.
>>
>> It is possible to recompile nginx with different value if you need
>> to, see http://nginx.org/en/docs/howto_build_on_win32.html.
>>
>> On ther other hand, if you are using nginx in production I would
>> recommend to consider using Unix variants instead.
>>
>
> Thank you very much for the explanation and recommendation,
>
>
> Igal
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
oscaretu .
Re: Windows 1024 Connections Limit
April 13, 2017 10:20AM
Since two days ago Windows Vista is part of the past:

http://www.theverge.com/2017/4/11/15241580/microsoft-windows-vista-end-of-support

Kind regards,
Oscar

El El jue, 13 abr 2017 a las 9:55, B.R. via nginx <[email protected]>
escribió:

> Even though using nginx on Windows goes way over my head (even for
> development) and/or seing WIndows as any kind of server, I read that
> Windows Vista+ support the poll (well, actually WSAPoll
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms741669.aspx)
> system call.
> Since XP may now reasonably be called something of the past, would not it
> be nice to go for it? No epoll, though.
> ---
> *B. R.*
>
> On Wed, Apr 12, 2017 at 7:42 PM, Igal @ Lucee.org <[email protected]> wrote:
>
>> Maxim,
>>
>> On 4/12/2017 5:57 AM, Maxim Dounin wrote:
>>
>>>
>>> On Windows, nginx uses select() system call to handle connection
>>> events. This syscall implies fixed-size bitmasks to pass file
>>> descriptors from userland to kernel and back. Size of these
>>> bitmasks can be only specified during compilation, and 1024 is the
>>> value nginx uses for official binaries to balance between maximum
>>> number of connections and unneeded overhead implied by large
>>> bitmasks.
>>>
>>> It is possible to recompile nginx with different value if you need
>>> to, see http://nginx.org/en/docs/howto_build_on_win32.html.
>>>
>>> On ther other hand, if you are using nginx in production I would
>>> recommend to consider using Unix variants instead.
>>>
>>
>> Thank you very much for the explanation and recommendation,
>>
>>
>> Igal
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

--
Oscar Fernandez Sierra
oscaretu@gmail.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Igal @ Lucee.org
Re: Windows 1024 Connections Limit
April 13, 2017 04:10PM
Hi,

On 4/13/2017 12:54 AM, B.R. via nginx wrote:
> Even though using nginx on Windows goes way over my head (even for
> development) and/or seing WIndows as any kind of server,
It's very simple - this system was set up many years ago and I was
uncomfortable at the time with running Linux -- not with the stability
of Linux at the time and not with my skills administering it. The next
server that I will set up for production will be a Linux machine, but
until then I'm stuck with Windows.

I was using IIS as a web server for many years, until about five years
ago I "saw the light" and upgraded to nginx. Having nginx available for
Windows is a great thing because it serves as a stepping stone and
allows Windows users to make smaller changes to their systems rather
than one big change.

> I read that Windows Vista+ support the poll (well, actually WSAPoll
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms741669.aspx)
> system call.
> Since XP may now reasonably be called something of the past, would not
> it be nice to go for it? No epoll, though.
I agree that XP is out of the picture now, and the servers that I need
to support are 2008R2 which are built on the Vista code base so this
system call is supported.

Can you explain briefly how WSAPoll would help here?

Thanks,


Igal

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Maxim Dounin
Re: Windows 1024 Connections Limit
April 13, 2017 04:30PM
Hello!

On Thu, Apr 13, 2017 at 09:54:34AM +0200, B.R. via nginx wrote:

> Even though using nginx on Windows goes way over my head (even for
> development) and/or seing WIndows as any kind of server, I read that
> Windows Vista+ support the poll (well, actually WSAPoll
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms741669.aspx)
> system call.
> Since XP may now reasonably be called something of the past, would not it
> be nice to go for it? No epoll, though.

I've looked into WSAPoll() support a while ago. Unfortunately, XP
is still widely used in real life, over 5% worldwide:

http://gs.statcounter.com/os-version-market-share/windows/desktop/worldwide

This is likely to become an option in the not-so-distant future though.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login