java.lang.OutOfMemoryError: Unable to Create New Native Thread

Troubleshooting Git

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community


The catalina.out logs report that Stash is running out of memory:

27-Mar-2015 19:20:00.717 SEVERE [http-nio-57990-exec-5]$SocketProcessor.doRun 
 java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(


Stash during normal operations will fork Git processes to complete many of it's functions. These Git processes use memory that is available to the system and does not use the memory allocated in the JVM. This error indicates that there was not enough memory for a Git process to start. More information about how much memory Stash requires can be found at Scaling Stash.


Reduce the number of Git hosting operations allowed on the server by lowering the throttle.resource.scm-hosting in

#Default - throttle.resource.scm-hosting=1.5*cpu


Increase the available system memory for the Stash server.

Last modified on Mar 30, 2016

Was this helpful?

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