The service is still running. The process is there, the memory looks normal, and the CPU is almost idle. But every request hangs until it times out, and the logs stopped twenty minutes ago without a single error. Someone suggests restarting it. Before you do, spend one minute capturing what every thread inside it is doing right now. That snapshot is called a thread dump, and once you have read one, you will never want to restart a stuck service blind again.
On the Java virtual machine there are three common ways to take one. Run jstack followed by the process id. Or run jcmd with the process id and Thread.print. Or send the process a quit signal with kill -3, which makes the JVM write the dump to its own standard output, so in a container it appears in the logs. Take three dumps about ten seconds apart. A thread that is in the same place in all three is stuck, not busy.
Each thread appears with a name, a state and a stack trace. The state tells you a lot.…