Debugging memory leaks

Chris Angelico rosuav at gmail.com
Thu Jun 13 18:36:24 EDT 2013


On Fri, Jun 14, 2013 at 6:15 AM, Giorgos Tzampanakis
<giorgos.tzampanakis at gmail.com> wrote:
> On 2013-06-13, dieter wrote:
>> Therefore: if the leak seems to be small, it may be much more advicable
>> to restart your process periodically (during times where a restart does
>> not hurt much) rather than try to find (and fix) the leaks. Only when
>> the leak is large enough that it would force you to too frequent
>> restarts, a deeper analysis may be advicable (large leaks are easier to
>> locate as well).
>
>
> Am I the only one who thinks this is terrible advice?

Definitely not alone there, but I'm biased; I like to keep systems and
processes running for ridiculous lengths of time. Up until we suffered
a simultaneous UPS failure and power outage, I had one process still
running from shortly after the system had been booted... over two
years previously. (That same program now has 20 weeks+ of uptime.)
Granted, that would be impractical in Python, since it's not easy to
edit code of a live system; but still, once your code is stable, you
wouldn't be restarting for that, and your uptime figures should be
able to reflect that.

ChrisA



More information about the Python-list mailing list