no buffer space available error
Peter Hansen
peter at engcorp.com
Wed May 15 19:49:34 EDT 2002
sebastien wrote:
>
> I have simplified the program so that you can count the number of
> socket open at a time.
>
> 1) I have checked that all the sockets open are closed (see the code)
There's no guarantee that close() for a socket will actually
release all the resources. If you open a bunch of client sockets
and then close them, I believe you'll see with 'netstat' that
they are in some kind of CLOSE_WAIT state, which might persist
for a while. This may or may not reduce the number of sockets
that the OS makes available.
Another thing you might investigate is Socket.shutdown() ...
Also, it's recommended usually that you use the 'threading'
module instead of 'thread'...
-Peter
More information about the Python-list
mailing list