in reply to My code randomly stops working

You haven't posted any code so we have no way to comment on that.

If a piece of code just stops working something has to have changed. This could be any of the following:

Computers are fairly deterministic in nature so "random" doesn't really play into this space well. Something, somewhere has to change for your code to just stop working.


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re^2: My code randomly stops working
by blue_cowdawg (Monsignor) on Mar 27, 2013 at 15:08 UTC

    One anecdote to relate: Where I work there is a piece of Perl code that processes thousands of emails. One of the early "bugs" discovered in this code was that it grew RSS wise and since there were several copies of this code running constantly this could become a problem. To solve the issue the developer added introspective code to determine the scripts RSS size and if it went over a certain amount it spawns and dies.

    Given that you stated that the issue you are experiencing happens after the code has been running for a while maybe you could do something similar?


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

      The better: As soon as the process uses more than a defined amount of memory it should invoke a machine reboot...

      McA

      P.S.: Sorry, couldn't resist ;-)

        Well... the newest version of the software I cited doesn't run out of memory quite as fast. The developer re-architected it completely (he inherited the code originally) and it behaves much better and more efficiently.


        Peter L. Berghold -- Unix Professional
        Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg