Cannot establish more than 2047 connections in Windows (cygwin build)

Bug #1145491 reported by Adolfo Zamora
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mosquitto
Confirmed
Undecided
Unassigned

Bug Description

We've been testing the broker on a Windows Server 2003 R2 environment, and have found that you can't have more than 2047 clients connected at the same time.

In mosquitto.conf, the max_connections parameter is set to -1.

We've confirmed that this issue is related to the Mosquitto broker, when we made the same test using another broker, we could easily exceed the 2047 limit.

We believe this issue is related to the Windows hard limit of 2048 open files from a single application. The following links describe this limitation:

http://msdn.microsoft.com/en-us/library/6e3b887c.aspx
http://tinyclouds.org/iocp-links.html (see the TCP Sockets paragraph)

By changing the sources, this limit should be able to be exceeded, specifically for Windows platforms.

Thanks for the support.

Revision history for this message
Roger Light (roger.light) wrote :

Thanks for the report, I'll see about getting that fixed.

Revision history for this message
Roger Light (roger.light) wrote :

I misunderstood the first link at first. I thought I could use _setmaxstdio() to increase the number of connections, but that only allows a maximum of 2048. Changing to use IOCP would fix it, but that will only happen moving to an event library like libuv. This is something I'm planning, but it's quite a big change to put together.

Revision history for this message
Adolfo Zamora (azamorapl) wrote :

That's ok, you can let me know whenever you release a test build using IOCP so I can help with testing.

Regards.

Changed in mosquitto:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.