python slowdown after a longish time of running (garbage collector)

Thomas Jensen spam at
Sat Aug 31 03:31:27 CEST 2002

Michal Vitecek wrote:
>  okay, thank you. it'll be pretty hard to describe it so much in detail,
>  but here it goes:
>     - the server waits on named socket and accepts clients' requests via
>       via stream where each command is a cPickled tuple (command,
>       commandData,)

Do you close the sockets manually or rely on the GC?
I had a similiar problem recently when stress-testing a web-application.
The GC apparently never got around to collecting the sockets, which 
resultet in lots of open sockets.
I don't even know if the GC is supposed to handle sockets, but why not?
Anyway, explicitly .close()'ing the sockets is probably always a good idea.

Best Regards
Thomas Jensen
(remove underscore in email address to mail me)

More information about the Python-list mailing list