[Twisted-Python] twisted run out of file descriptors
Uwe C. Schroeder
uwe at oss4u.com
Tue Oct 26 01:37:05 EDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
check your /proc/sys/fs/file-max
file. It's the max number of file descriptors the kernel will handle.
if it's 1024 just set it to something higher (2048 or 4096)
I don't know if that's really the reason, but it doesn't hurt either to give
it a shot
On Monday 25 October 2004 09:40 pm, Alec Matusis wrote:
> I am running twisted on 2.4.21 Kernel.
> 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
> file descriptors.
> 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?
> Sample Errors:
> internet/default.py", line 487, in doSelect
> , timeout)
> exceptions.ValueError: filedescriptor out of range in select()
> 2004/10/25 16:35 PDT [-] Malformed file descriptor found. Preening
> 2004/10/25 16:35 PDT [-] bad descriptor
> Alec matusis
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Twisted-Python