I just have a web application which hangs after few minutes. Basically, this is an application to build and preview forms, very customized, and after few minutes of intensive user interaction, the application just stops working. This means, a request is done and never returns a reply.

I am "a bit" lost as I don't find any clue about the hang in tomcat logs and application logs either. The application server is running as I am using lambda/psi-probe and can check any other and even the troublesome application with no problem (probe itself is another web application).

The application uses hibernate, which was working ok for long time, and, recently, to improve the performance (hibernate injects a lot of queries if you work exclusively with it) I have introduced native sql via java.sql standard api. I am careful not to mix both and they are only used in a jsp, first retrieving some (few) objects with hibernate and then using some logic with jdbc. Hibernate session is closed before using jdbc.

I have read something about database connection problems (I've checked several times and database server is running ok), deadlocks or runaway threads, checked using VisualVM in VisualVM.

So, anybody can give a clue about finding or trapping the hang? can give something a clue to use VisualVM to catch or trap the hypothetical runaway thread or deadlock? The latter would enlighten me as I just see waiting and running threads.

I am using tomcat 6.0.21 (I always tried 7.0.11 with same results) java 1.6 on mac osx and linux (development and preproduction machines)

Any ideas will be welcome for sure
thanks

w i l l y