I have a web app that performs great and then suddenly a page request will freeze up and time out and then everything will be dandy again for a little bit and the same thing happens.
I’m having hard time getting to the bottom of this because there are so many variables that can be analyzed.
Is there any way: a tool or step plan that can help me get to the bottom of this and basically analyze this whole thing from page request to database call and identify the potential problems? I use New Relic and MAT and I just started using Javamelody but to be honest: where to focus? And usually when a page freezes / times out it’s not clear where the bottleneck was. What are thresholds / red flags to look out for?
Kind regards,
Marc
For the server side, I found that jstack is usually a much better tool than profilers. Mostly because it’s quick, command line and already installed with your server’s JDK.
A typical cause for an intermittent web app slow down is a thread waiting on some lock to release.
Run
jstackwhen the web app appears stuck and look through the threads to see which ones are stuck on a lock and what the lock is. Here’s a quick tutorial because it can sound daunting at first but it’s really simple.