[Twisted-web] About handling thousands of sockets connections simultaneously

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Tue Sep 7 08:50:20 EDT 2010

On 09:25 am, hustxnwsg at gmail.com wrote:
>i use twisted as TCP server, when handling  thousands of sockets 
>simultaneously, i have found that the maximum TCP connections limited 
>500. What's the matter?

Try switching to a different reactor.  For example, the select reactor 
is limited to FD_SETSIZE open sockets.  This is usually around 1000, but 
could be 500 on some systems.  Poll reactor is limited to the "open 
files" rlimit which can be raised by superusers.  IOCP reactor has no 
arbitrary limits, I think.



More information about the Twisted-web mailing list