ValueError: filedescriptor out of range in select()

Laszlo Nagy gandalf at shopzeus.com
Tue Mar 17 15:31:33 CET 2009


>
> Hi Laszlo,
> Just a hunch -- are you leaking file handles and eventually running out?
These file handles are for TCP sockets. They are accept()-ed, used and 
then thrown out. I guess after the connection was closed, the file 
handle is destroyed automatically. BTW here is the shutdown() method for 
socket based endpoints:


def shutdown(self):
try:
self.socket.shutdown(socket.SHUT_RDWR)
except socket.error:
pass
StreamEndpoint.shutdown(self)

This method is called after the connection has been closed. Is is 
possible that somehow the file handles are leaking?

L




More information about the Python-list mailing list