Recently, I faced an issue with an application which is deployed in a Tomcat web container: In one of the environments it started to consume a lot of CPU cycles and memory.
My first attempt to investigate, is to run things locally and have a look at the Activity Monitor that comes with macOS. Often enough it’s enough to notice which app uses a lot of memory or CPU cycles.
This time though, I wanted some deeper insight and I already knew what I was looking for. Some searching in the net brought up Glowroot.
Even though I’m not experienced in using Tomcat, it was pleasantly easy and quick to get going:
Download a zip file and unpack it.
Copy the folder to a place where it’s convenient. I copied it into an existing folder I’m using to keep configuration info for Tomcat anyway.
Set up a way for Tomcat to find and use the Glowroot jar file.
The my project this (so far) only confirmed that memory consumption can increase a lot when the system gets some traffic. Using well over 10GB of memory within a few minutes is a lot, especially when that memory isn’t released any time soon.
Are you using a tool that was particularly easy to use and provided what you were looking for? Which one?