Locking DB and hanging Hibernate

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Locking DB and hanging Hibernate

gersav
Has anyone seen anything similar to the following :-

I have an Spring\Hibernate\Tomcat\SqlServer application that was previously using JOTM. We migrated it to use Bitronix but now we are seeing scenarios where hibernate hangs on some table access, locking the database table, requiring a restart of the application and the DB Server.

This only started occuring after the move to bitronix. For some of the scenarios, rejigging how we use the @Transactional notation to make it more granular - i.e. reducing transaction 'length' to small chained transactions, avoids the problem, but doesn't really get us further forward in understanding what is causing the problem.

Has anyone seen something similar or have any suggestions?
Reply | Threaded
Open this post in threaded view
|

Re: Locking DB and hanging Hibernate

Ludovic Orban
Administrator
I guess this has to do with database locks but it is impossible to confirm with so little information. This looks like you're experiencing deadlocks but I guess SQL Server would detect them and automatically kill one of the deadlocked clients' connection.

I'd suggest you to monitor the DB's lock management. While you're at it, also look at the Windows DTC pending transactions list and make sure it stays empty.