Hello,
I'm having one of those problems where I just don't know where to begin. My hunch is that this is not originating from Hibernate, but then again, I'm really clueless, but this seems like the logical place to start. Hopefully somebody can give me some ideas on where to begin looking or at least rule out some things to narrow down the list.
My information will be pretty high level at first because I'm not sure what kind of details are needed. But here are the basics...
Tomcat 5.5
Hibernate 3.2
SQL Server 2005
JTDS 1.2
Every once in a while, seemingly at random, any queries to the database lock up. To back up a bit.. this is a web application, users access the att in Tomcat from a web browser. Most pages in the app hit the database almost exclusively via Hibernate lazy loading and/or HQL queries. When it's working, it's working good. Every once in a while, somebody will hit a web page, and the page won't fully load... the browser will just sit there waiting for the rest of response from the server. I'll then go and check my debug console (running in Eclipse) and I will see the last thing that was done is an HQL query to the database was sent. I don't see any more debug output indicating a reply. From that point on, the app will continue to do the same thing. If somebody else goes to a web page (any page that queries the db), the app server will receive the http request and being to reply, but will again hang on the first query. So essentially, the app is dead from that point on, until I restart the app server.
After some investigation, I thought maybe I was leaking connections and the lockup came from running out of available connections. However, I may have ruled that out since the last time it happened, it happened with about half of the connections open to the db as the previous time it happened. Also, it didn't seem to recover after simply killing some connections in sql.
I thought maybe it was contention or a deadlock on a table in sql server. I'm not expert here, but it seems to me that if that was the case, then it would only affect queries on that table. However, as i mentioned before... once this happens, queries to *all* tables (from the web app) never respond. However, while the app is locking, i'm AM able to go into a SQL query tool and make queries against the db just fine.
Also note that there is no apparent slowdown (performance degradation) prior to the locking problem, it's just really sudden.
I don't know what other information to give for someone to maybe help me. But I'm posting this here in hopes that somebody will have some ideas or ask some questions for more detail.
Any ideas the cause of the problem? Any troubleshooting tips? Or know of another good forum to try?
Please help... getting kind of desperate ;-(
|