Finally found the reason. We are creating 2 EntityManagerFactory from same persistence unit and were expecting it it to have 2 different connection pools but they share same connection pool.
Web application freezes. How do I find the reason?
-
30-05-2022 - |
Вопрос
The application is running on apache tomcat 7.0.37. It is a Java/GWT application using JPA and MySql.
Sometimes we find it completely unresponsive. Today was the 2nd time it happened in 5 months. It works fine after restart. Both the time this behavior is observed when traffic was less.
I analyzed the thread dump and do not find any deadlocks.
Any help on approaching the problem is appreciated.
Thanks, Kisor
Решение 2
Другие советы
You mentioned GWT which is entirely front-end and would most likely have nothing to do with a server problem.
If the problem is the gwt-based browser client, you may have memory performance problems (and refreshing your browser would reset it - not sure what you mena by restart, restart server or refresh client).
It is pretty easy to freeze your client if you have client code that recreates many widgets/dom elements and hangs on to them.
Again, if this is the gwt-client that has problems, you can easily profile this with Speedtracer.
Chrome > Speed Tracer > Timeline > Memory (also have a look at events)
If this is a problem, you probably need to take a deep look at your code