'Not enough storage is available to process this command' thrown when using jstack to generate external thread dumps

Still need help?

The Atlassian Community is here for you.

Ask the community


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.


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 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.  

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.

Last modified on Feb 23, 2016

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.