If Confluence stops responding and you cannot access its integrated Generate Thread Dump feature, it is possible to create thread dumps outside the application. External thread dumps are also useful if you require information on locks being held or waited upon by threads.
Generating a Thread Dump on Linux, including Solaris and other Unixes
Identify the java process that Confluence is running in.: This can be achieved by running a command similar to:
ps -ef | grep java.
Find the process ID of the JVM and use the ps command to get list of all processes:
kill -3 <pid>
The thread dump will be printed to Confluence's standard output (catalina.out).
Generating Thread Dumps on Windows
From the console
If you are running Confluence through a console, rather than as a service, you can click on the console and press <CTRL>
+BREAK
Using jstack
The JDK ships with a tool named jstack for generating thread dumps.
- Identify the process. Launch the task manager by, pressing
Ctrl + Shift + Esc
and find the Process ID of the Java (Confluence) process. You may need to add the PID column usingView
->Select Columns ...
Run jstack <pid> to Capture a Single Thread Dump. This command will take one thread dump of the process id <pid>, in this case the pid is 22668:
adam@track:~$ jstack -l 22668 > threaddump.txt
This will output a file called threaddump.txt to your current directory.
Output
Standard logging for Confluence Stand-alone is sent to the atlassian-confluence.log, in the confluence-home directory, not in the confluence-install directory. Thread dumps are an exception since they dump the threads of the entire application server - they'll appear in the catalina.out file in the application directory's logs folder. You can search for the term "thread dump" in the log file for the beginning of the dump. Submit this along with the atlassian-confluence.log in your support ticket.
Thread Dump Analysis Tools
- Samurai
- Thread Dump Analyzer TDA TDA 1.0 Final can be obtained from the
java.net