NT select.select?

Markus Stenberg mstenber at cc.Helsinki.FI
Sun Aug 1 13:24:38 CEST 1999


Brian Lloyd <Brian at digicool.com> writes:
> > Is there some low limit on maximum number of sockets you can 
> > have in the
> > Python-NT's select call? A program that happens to work 
> > perfectly on Linux
> > seems to die on NT around 64(?) sockets to the 'too many file 
> > descriptors
> > in call' error.
> > 
> > Any portable ways to bypass it?
> > 
> > -Markus
> It turns out that NT has a default 64 fd limit on arguments to
> select(). The good news is that you can actually bump the limit up 
> to whatever number you want by specifying a define when compiling 
> python15.dll.

I was hoping for version that works with 'Python out of the box' (I kludged
something in pure python with threads that bypasses this limit, but it
isn't pretty).

> The default 64 fd limit is too low for anyone trying to run
> an async server that handles even a modest load, so I've 
> submitted a bug report to python.org asking that the define
> above find its way into the next python release...

Agreed. Unless it causes some Huge Load(tm) somewhere, it should be
definitely raised. (say, 1024 or 4096 sounds reasonable to me)

> Brian Lloyd        brian at digicool.com
> Software Engineer  540.371.6909              
> Digital Creations  http://www.digicool.com 

-Markus

-- 
"...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning."
	- Matt Welsh




More information about the Python-list mailing list