[Haskell-cafe] pool, persistent, persistent-sqlite: Space leak

Ertugrul Soeylemez es at ertes.de
Thu Mar 31 02:52:10 CEST 2011

Hello Michael, hello fellow Haskellers,

there seems to be a space leak in either 'pool', 'persistent' or
'persistent-sqlite'.  From the behaviour I suspect the bug to be in
'pool'.  When I run a transaction in an infinite loop, my program keeps
eating more and more memory, even if the transaction itself doesn't do

    forever $ runSqlPool (return ()) pool

This doesn't happen for non-pooled connections, i.e. the following code
runs in constant space as expected:

    forever $ runSqlConn (return ()) conn

Versions are pool-0.0.1, persistent-0.4.2, persistent-sqlite-0.4.0.  It
happens for both file and in-memory databases.


nightmare = unsafePerformIO (getWrongWife >>= sex)

More information about the Haskell-Cafe mailing list