[medusa] HELP! too many file descriptors in select()!!!!
Gregory P. Smith
Fri, 6 Apr 2001 13:44:44 -0700
On Fri, Apr 06, 2001 at 08:32:11PM -0000, Weiss Blitz wrote:
> I got the following message from Python20/Medusa running on a Win2k
> Advanced Server:
> Traceback (most recent call last):
> File "zulu_start.py", line 254, in ?
> File "d:\\zuluforumserver\asyncore.py", line 139, in loop
> poll_fun (timeout, map)
> File "d:\\zuluforumserver\asyncore.py", line 67, in poll
> r,w,e = select.select (r,w,e, timeout)
> ValueError: too many file descriptors in select()
> Only seem to be around 50 to 60 socket connections when this happened
> Does anyone knows what's the limit on the selector descriptors?!
> Or a way around this?
> Carlos :(
You need to recompile the _select.pyd Python module with FS_SETSIZE
set to a reasonable number (such as 256). Windows, by default, only
supports up to 64 file descriptors in a call to select.
I believe they have changed the default compilation to python in
python 2.1 to use 256 or 512.
(you'll still hit this problem at those higher numbers of sockets; at
that point you should look into making your application not require as
many open sockets at once)
Gregory P. Smith gnupg/pgp: http://electricrain.com/greg/keys/
C379 1F92 3703 52C9 87C4 BE58 6CDA DB87 105D 9163