Our application is hanging (or has high CPU or high RAM or just slowness) but there is no OOM or outage, how can we determine what is going on?
Release : All Supported Clarity Releases
Note: This manual heap dump is different from Heap dump on OOM (aka automatic heap dump) as the application is not in outage so the OOM heap dump may not be generated.
Steps:
1. Connect to the Clarity server having the slowness issue.
2. Run the Java command below (you may have to run it from Java directory):
jmap -dump:format=b,file=heapdump <process id>
3. This will create a dump from the moment of the hanging thread like a current snapshot.
IMPORTANT:
You always have to provide the PID for the java.exe, not the Clarity Tanuki Service Wrapper (e.g. serviceappcmd.exe). Otherwise the command will fail.
If the service you're trying to work with is an app or nsa, you can also usually check for which process the port is listening on in order to determine through the netstat command. For example, if you have your app URL listening on port 1561 so that users visiting Clarity enter http://servername:1561 to connect, you can find the PID with this (Windows):
D:\Clarity>netstat -ano | find /i ":1561"
TCP 0.0.0.0:1561 0.0.0.0:0 LISTENING 7164
D:\Clarity>