[Twisted-Python] twisted run out of file descriptors
tv at twistedmatrix.com
Tue Oct 26 03:25:08 EDT 2004
Alec Matusis wrote:
>My chat server has been puking and dying the last couple days and it
>seemed pretty clear that it was dying when it was reaching 1024 open
>I noticed the default ulimit -n was 1024, so I added a 'ulimit -n
>4096' before starting the chat server. That has apparently allowed it to
>1024 descriptors (it has 1263 at the moment) but now it is failing to
>call select (see sample errors below).
>There is this value
>FD_SETSIZE in the C headers that determines the maximum number of
>sockets a proc can select() on, and it's set to 1024. It it possible to
>increase this limit, short of recompiling the Kernel?
Yes (in some libcs) but you don't want to play with that thing. Switch
Poll has no builtin limits, but will start to get slow after a few
But, do you know why your app has over a thousand fds open? If there's
good reason, you have a leak and should fix that. A thousand fds is
quite a lot.
More information about the Twisted-Python