[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
anything:

    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.


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/





More information about the Haskell-Cafe mailing list