HELP! too many file descriptors in select()!!!!
Sat, 07 Apr 2001 18:45:15 -0000
Is 512 the maximum possible number of file descriptors under Win2k
What about under Linux?
Do I hear 32767 or higher? Please,please,please?!!
This will greately limit the number of open sockets that Medusa can
handle concurrently! My application is an instant-messenger server
and needs to maintain an open socket connection with each client!
--- In medusa@y..., "Gregory P. Smith" <greg@e...> wrote:
> On Fri, Apr 06, 2001 at 08:32:11PM -0000, Weiss Blitz wrote:
> > I got the following message from Python20/Medusa running on a
> > Advanced Server:
> > Traceback (most recent call last):
> > File "zulu_start.py", line 254, in ?
> > asyncore.loop()
> > 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
> > !
> > 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;
> that point you should look into making your application not require
> many open sockets at once)
> Gregory P. Smith gnupg/pgp: http://electricrain.com/greg/keys/
> C379 1F92 3703 52C9 87C4 BE58 6CDA DB87 105D