Message 280900 - Python tracker (original) (raw)
Back in 1999 the compile-time constant FD_SETSIZE was raised from (the default on Windows) 64 to 512 open sockets to support serious async servers
http://bugs.python.org/issue210843 https://github.com/python/cpython/blame/master/Modules/selectmodule.c#L29-L36
The world has moved on and serious async servers require far more than 512 sockets available. This is one of the key reasons why tornado explicitly states:
Tornado will also run on Windows, although this configuration is not officially supported and is recommended only for development use.
Yes, using select on Windows is the wrong thing to do, but it's far preferable to be able to use a library which makes use of select, putting up with the poor performance than it is to be told to use linux which often isn't an option.
Since there's no alternative other than recompiling Python it would be good if this constant could be increased to a more useful (these days) value of say 16384.
As a data point ZMQ have recently increased the value of this constant to 16k themselves