[Twisted-Python] twisted run out of file descriptors
matusis at matusis.com
Tue Oct 26 01:58:27 EDT 2004
Hi- thanks - that number i have changed- but that's total number for the
alecm at web0:~> cat /proc/sys/fs/file-max
I also changed the number of fds available PER child PROCESS in a shell
ulimit -n 4096
select() call has it's own hardcoded number apparently...
From: twisted-python-bounces at twistedmatrix.com
[mailto:twisted-python-bounces at twistedmatrix.com]On Behalf Of Uwe C.
Sent: Monday, October 25, 2004 10:37 PM
To: Twisted general discussion
Subject: Re: [Twisted-Python] twisted run out of file descriptors
-----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-----
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
More information about the Twisted-Python