[Haskell-cafe] thread blocked indefinitely in an STM transaction

Eric Wong wsysdu at gmail.com
Mon Nov 21 04:20:25 CET 2011


Hi everyone,

I'm writing an API server using the snap framework with the new snaplet infrastructure. In order to connect with the database, I'm using snaplet-hdbc, HDBC, HDBC-mysql.  (I'm using InnoDB for storage engine so it can process transaction).  Every query is wrapped in the function withTransaction' so I don't have to commit or rollback by hand. If there's a SqlError raised, I will catch it, log the error and return an error message to the client side.  But when running the program, if there's a DB error, the process will be blocked and there's an error message: " thread blocked indefinitely in an STM transaction". There's no STM related code in my code. Do you have any idea on this error and how to process this?
Thanks.

Eric.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111121/23788727/attachment.htm>


More information about the Haskell-Cafe mailing list