'Not enough storage is available to process this command' thrown when using jstack to generate external thread dumps
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
You may be instructed by Atlassian Support to generate a thread dump using the jstack tool on a Windows platform. This error is thrown when trying to execute the command.
Cause
Jstack only allows you to connect to JVM's running in the same user context. Many people use a service wrapper to start their products: this puts the JVM in the Local System Account user context. Since this special account has no login shell, you won't be able to force a thread dump normally.
Workaround
Workaround 1:
Change the service wrapper to use another account. Do this from Services>Apache Tomcat Confluence>Properties.
Workaround 2:
Use Psexec to execute the jstack command as the relevant user.
1
psexec -s "%JAVA_HOME%\bin\jstack.exe" PID >stack.txt
Workaround 3:
Follow the Live Monitoring Using the JMX Interface directions and set up a JMX monitoring tool like visualVM acting remotely on the JVM. Many of these tools can generate thread dumps externally.
Was this helpful?