Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.037 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'python,': 0.02; 'granted,': 0.07; 'restarting': 0.07; 'advice?': 0.09; 'restart': 0.09; 'system;': 0.09; "wouldn't": 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'impractical': 0.16; 'leaks': 0.16; 'lengths': 0.16; 'wrote:': 0.18; 'figures': 0.19; 'small,': 0.19; 'seems': 0.21; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'easier': 0.31; 'that.': 0.31; 'ups': 0.31; 'running': 0.33; 'alone': 0.33; 'fri,': 0.33; 'there,': 0.34; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'but': 0.35; 'received:google.com': 0.35; '14,': 0.36; 'reflect': 0.36; 'should': 0.36; 'too': 0.37; 'two': 0.37; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'rather': 0.38; 'that,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'easy': 0.60; 'times': 0.62; 'more': 0.64; '(that': 0.65; 'periodically': 0.68; 'shortly': 0.68; 'analysis': 0.75; 'power': 0.76; 'leak': 0.84; 'much)': 0.84; 'terrible': 0.84; 'uptime': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=l2Q8BYAI7lGy/H7njhfo6A7tf+2UvWpJwDytIVm64SM=; b=vRtipwerPlP8TuwGtYRRE7jO9aqHNM0BKONjQsUsk1WUxjmVuizmlCqBvm0A9MRz9b v+c+bLmyYG7Ry9VIG0CXgeBM7qGscclOqjxwUplXmjTJsB8KdASl+/GuDpOP+Gwoy/3K zCfjIKQVtHdpjUc40AkcS7fhFAJ6eUSCfi/jLggnJ2lvDR38MSqCQY57lL50u4LRa+zr 6ISc6833m11zDYV4oulOL24n6SeVpFwzQd5kl6TrYhzFt7Uw4Sjht9CKTVVGGjybkhbZ dPQCGRXMC5mUb3agMWqNhspDRWMPo8cbiAiw40DPhuIwuaUY4e+jdQf3TD6ESr5IWgMJ ta7g== MIME-Version: 1.0 X-Received: by 10.52.155.67 with SMTP id vu3mr1062880vdb.94.1371162984617; Thu, 13 Jun 2013 15:36:24 -0700 (PDT) In-Reply-To: References: <09917103-b35e-4728-8fea-bcb4ce2bd1af@googlegroups.com> Date: Fri, 14 Jun 2013 08:36:24 +1000 Subject: Re: Debugging memory leaks From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371162987 news.xs4all.nl 15920 [2001:888:2000:d::a6]:33890 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48037 On Fri, Jun 14, 2013 at 6:15 AM, Giorgos Tzampanakis 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