Unofficial Hacker News client - receive Push Notifications on replies.

If you want failover to work well, use it often (opens external site)

533 points by madflojo 1 day ago | bencane.com | 140 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (4)

  1. > I don't recommend this to paper over memory leaks -- you still need to fix those! But it results in tremendous stability.

    I'm not actually sure you really need to chase after slow leaks? It feels dirty, but honestly, restarting each part of the system randomly around once a day is good anyway. (Or once a week as you say.)

    If you can leak faster than that: sure, fix it. But if you slowly leak a few MiB per hour of running, you might just ignore it?

    Replies (2)
    1. The problem is if you don't chase it you can never be sure if this is just a slow leak, or a symptom of a more significant problem that hasn't hit yet. There are many many ways your system can be seriously wrong yet the only obvious symptom is the memory leak. Worse, once you accept one memory leak because it really is not a problem (in the majority of cases a small leak is not a problem under the constraints you have set) when a second memory leak can sneak in under your leak thresholds and be ignored even though the leak is just the first sign of a major problem.

      If there is a bug, no matter how minor, fix it before any other feature work is allowed. That is the only sane way to keep a system sustainable.

    2. > From: k...@rational.com (Kent Mitchell)

      > Subject: Re: Does memory leak?

      > Date: 1995/03/31

      > This sparked an interesting memory for me. I was once working with a customer who was producing on-board software for a missile. In my analysis of the code, I pointed out that they had a number of problems with storage leaks. Imagine my surprise when the customers chief software engineer said "Of course it leaks". He went on to point out that they had calculated the amount of memory the application would leak in the total possible flight time for the missile and then doubled that number. They added this much additional memory to the hardware to "support" the leaks. Since the missile will explode when it hits its target or at the end of its flight, the ultimate in garbage collection is performed without programmer intervention.

      Replies (1)
      1. And then some years later an order comes for an extended range version...

        I've seen so many projects get bitten somewhere down the line by such shortcuts. Much easier to fix them when they're first created than to hunt for them a decade later in a codebase that was supposed to be proven in the field, but suddenly stopped working properly.