Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #48037

Re: Debugging memory leaks

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 <rosuav@gmail.com>
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 <slrnkrkacg.2u4.giorgos.tzampanakis@brilliance.eternal-september.org>
References <09917103-b35e-4728-8fea-bcb4ce2bd1af@googlegroups.com> <mailman.3165.1371104977.3114.python-list@python.org> <slrnkrkacg.2u4.giorgos.tzampanakis@brilliance.eternal-september.org>
Date Fri, 14 Jun 2013 08:36:24 +1000
Subject Re: Debugging memory leaks
From Chris Angelico <rosuav@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3237.1371162987.3114.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Fri, Jun 14, 2013 at 6:15 AM, Giorgos Tzampanakis
<giorgos.tzampanakis@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Debugging memory leaks writeson <doug.farrell@gmail.com> - 2013-06-12 18:24 -0700
  Re: Debugging memory leaks dieter <dieter@handshake.de> - 2013-06-13 08:29 +0200
    Re: Debugging memory leaks Giorgos Tzampanakis <giorgos.tzampanakis@gmail.com> - 2013-06-13 20:15 +0000
      Re: Debugging memory leaks Steve Simmons <square.steve@gmail.com> - 2013-06-13 22:45 +0100
      Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-14 08:36 +1000
      Re: Debugging memory leaks Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-14 02:40 +0000
        Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-14 19:30 +1000
        Re: Debugging memory leaks Giorgos Tzampanakis <giorgos.tzampanakis@gmail.com> - 2013-06-14 22:57 +0000
          Re: Debugging memory leaks Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 01:39 +0000
        Re: Debugging memory leaks dieter <dieter@handshake.de> - 2013-06-15 08:52 +0200
        Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-15 17:21 +1000
        Re: Debugging memory leaks dieter <dieter@handshake.de> - 2013-06-16 08:18 +0200
      Re: Debugging memory leaks rusi <rustompmody@gmail.com> - 2013-06-14 06:53 -0700
        Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-15 10:11 +1000
        Re: Debugging memory leaks Ben Finney <ben+python@benfinney.id.au> - 2013-06-15 10:16 +1000
          Re: Debugging memory leaks rusi <rustompmody@gmail.com> - 2013-06-14 20:16 -0700
            Re: Debugging memory leaks Ben Finney <ben+python@benfinney.id.au> - 2013-06-15 21:23 +1000
              Re: Debugging memory leaks rusi <rustompmody@gmail.com> - 2013-06-15 04:35 -0700
                Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-15 21:54 +1000
  Re: Debugging memory leaks writeson <doug.farrell@gmail.com> - 2013-06-13 11:07 -0700
    Re: Debugging memory leaks Dave Angel <davea@davea.name> - 2013-06-13 14:44 -0400
  Re: Debugging memory leaks rusi <rustompmody@gmail.com> - 2013-06-14 05:36 -0700
  Re: Debugging memory leaks "Frank Millman" <frank@chagford.com> - 2013-06-21 08:50 +0200

csiph-web