Atomikos Forum

MySQL deadlocks cause connection pool leaks?

Whenever I get a deadlock exception in a MySQL transaction
participating in an XA-transaction, the corresponding connection
is never returned or freed from the connection pool. This eventually
leads to a starvation of the pool.

I have tried to figure out why this happens but I'm not really comfortable reading the Atomikos source code. I did however find the following:

When a deadlock occurs in MySQL an exception is thrown. So far so good.
Later on when the deadlocked victims connection is closed, Atomikos submits an XA_END command
to what MySQL responds with another exception (XA_RBDEADLOCK).
See http://bugs.mysql.com/bug.php?id=64202.

This behaviour differs from other all other errors that could occur so I guess it could have something to do with it.

Is this a known problem and are there any good workarounds?

I'm using the Atomikos 3.8.0 with Spring 3.0 and the JtaTransactionManager if that matters.

Regards
Lars Gråmark
Lars Gråmark Send private email
Friday, March 22, 2013
 
 
Hi,

This seems like something we could do better indeed. I have created a bug report for this - to be included in a future release.

Thanks!
Guy Pardon Send private email
Saturday, March 30, 2013
 
 
Thank you. Looking forward to it.
Lars Gråmark Send private email
Tuesday, April 09, 2013
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics