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.<br>The reader should leak only if you nest forever the &quot;local&quot; function.<br>
<br>paolino<br><br><br><br><div class="gmail_quote">2009/11/11 David Leimbach <span dir="ltr">&lt;<a href="mailto:leimy2k@gmail.com">leimy2k@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
As some of you may know, I&#39;ve been writing commercial Haskell code for a little bit here (about a year and a half) and I&#39;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&#39;s part of a server infrastructure management system.<div>

<br></div><div>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!)  </div>

<div><br></div><div>Anyway, rather than try to paste it all here with images and such I thought I&#39;d stick it up on my blog so others could maybe benefit from the anecdote.  It&#39;s difficult to disclose enough useful information as it is commercial code not under an open source license, but there&#39;s neat diagrams and stuff there so hopefully the colors are at least amusing :-)</div>

<div><br></div><div><a href="http://leimy9.blogspot.com/2009/11/long-running-haskell-applications.html" target="_blank">http://leimy9.blogspot.com/2009/11/long-running-haskell-applications.html</a></div><div><br></div><div>
Dave</div><div style="text-align: center;">
<font face="Georgia, serif" size="4"><span style="font-size: 16px;"><br></span></font></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>