Confluence Docs 3.2 : Generating a Thread Dump Externally
This page last changed on Mar 25, 2010 by asridhar.
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 WindowsTo take a thread dump from Windows:
Generating a Thread Dump on Linux, including Solaris and other UnixesFind the process ID of the JVM and use the ps command to get list of all processes: kill -3 <pid> Note: This will not kill your server (so long as you included the "-3" option, no space in between). Generating Thread Dumps using jstackIf you have trouble using kill - 3 <pid> to obtain a thread dump, or are on a Windows machine without internet access then try using jstack: a java utility that will output stack traces of Java threads for a given process. 1) Identify the java process that JIRA is running in:On *nix and Solaris ps -ef | grep javaThe process will appear similarly as follows: adam 22668 0.3 14.9 1691788 903928 ? Sl Jan27 9:36 /usr/lib/jvm/java-6-sun-1.6.0.14/bin/java -Djava.util.logging.config.file=/home/adam/Products/installs/atlassian-jira-enterprise-4.0.1-standalone/conf/logging.properties -XX:MaxPermSize=256m -Xms128m -Xmx1048m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Datlassian.mail.senddisabled=false -Datlassian.mail.fetchdisabled=false -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/home/adam/Products/installs/atlassian-jira-enterprise-4.0.1-standalone/common/endorsed -classpath /home/adam/Products/installs/atlassian-jira-enterprise-4.0.1-standalone/bin/bootstrap.jar -Dcatalina.base=/home/adam/Products/installs/atlassian-jira-enterprise-4.0.1-standalone -Dcatalina.home=/home/adam/Products/installs/atlassian-jira-enterprise-4.0.1-standalone -Djava.io.tmpdir=/home/adam/Products/installs/atlassian-jira-enterprise-4.0.1-standalone/temp org.apache.catalina.startup.Bootstrap start On windows 2) 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 22668
3) Take Multiple Thread DumpsTypically you'll want to take several dumps about 10 seconds apart, in which case you can generate several dumps and output the stack traces to a single file as follows: adam@track:~$ jstack 22668 adam@track:~$ jstack 22668 adam@track:~$ jstack 22668 OutputStandard 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 Tools
|
![]() |
Document generated by Confluence on Mar 28, 2010 19:36 |