Python server locks up

MRAB python at
Wed Sep 9 22:43:18 CEST 2009

Zac Burns wrote:
> I have a server running Python 2.6x64 which after running for about a
> month decides to lock up and become unresponsive to all threads for
> several minutes at a time. While it is locked up Python proceeds to
> consume large amounts of continually increasing memory.
> The basic function of the server is to serve a large dictionary -
> somewhat like a database. I have a couple theories as to why it locks
> up, but I'm not sure how to test them.
> Theories:
>    Python is resizing the large dictionary
>    Python is garbage collecting
> How would you suggest to figure out what is the problem?
If it has been running continuously all that time then it might be that
the dictionary has grown too big (is that possible?) or that it's a
memory fragmentation problem. In the latter case it might be an idea to
restart Python every so often; perhaps it could do that automatically
during a "quiet time", eg at midnight every Sunday.

More information about the Python-list mailing list