[Haskell-cafe] Long running Haskell program

Paolino paolo.veronelli at gmail.com
Thu Nov 12 08:18:40 EST 2009

Also, a *service* should have a persistence periodical action which should
evaluate (most part of) the state thunks in their values to be serialized.
This work for the structure similarity of NFData and Show/Binary classes.
When there is a not directly serializable part of the state , things can get
complicate, but resolving the persistence issue for those parts should
resolve also the space leak, I think.


2009/11/11 Paolino <paolo.veronelli at gmail.com>

> Hello  leimy, the only simple solution I have found to avoid  a leaking
> state of a server is doing a periodical rnf of it, this implying the NFData
> constraint on its datatype.
> The reader should leak only if you nest forever the "local" function.
> paolino
> 2009/11/11 David Leimbach <leimy2k at gmail.com>
>> As some of you may know, I've been writing commercial Haskell code for a
>> little bit here (about a year and a half) and I've just recently had to
>> write some code that was going to run have to run for a really long time
>> before being restarted, possibly months or years if all other parts of the
>> system cooperate as it's part of a server infrastructure management system.
>> I recently ran into some serious space leak difficulties that would
>> ultimately cause this program to crash some time after startup (my simulator
>> is also written in Haskell, and runs a LOT faster than the real application
>> ever could, this has enabled me to fast forward a bit the data growth issues
>> and crash in minutes instead of days!)
>> Anyway, rather than try to paste it all here with images and such I
>> thought I'd stick it up on my blog so others could maybe benefit from the
>> anecdote.  It's difficult to disclose enough useful information as it is
>> commercial code not under an open source license, but there's neat diagrams
>> and stuff there so hopefully the colors are at least amusing :-)
>> http://leimy9.blogspot.com/2009/11/long-running-haskell-applications.html
>> Dave
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091112/e31b96f7/attachment.html

More information about the Haskell-Cafe mailing list