Stash stops with HazelcastInstanceNotActiveException

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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


Stash stops and the following appears in the atlassian-stash.log:

2015-04-21 11:00:00,000 DEBUG [Navlink Plugin Executor:thread-5]  c.a.p.n.c.m.s.CachingLinkedApplicationCapabilitiesImpl Failed to refresh linked application capabilities cache
com.atlassian.cache.CacheException: com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is not active!
    at com.atlassian.cache.memory.DelegatingCachedReference.get( ~[atlassian-cache-memory-2.6.10.jar:na]
    at com.atlassian.cache.hazelcast.HazelcastHybridCachedReference.get( ~[atlassian-cache-hazelcast-2.6.10.jar:na]
    at com.atlassian.applinks.core.DefaultReadOnlyApplicationLinkService.getApplicationLinks( ~[na:na]
    at ~[atlassian-nav-links-plugin-3.3.15_1425959230000.jar:na]
    at com.atlassian.failurecache.ExpirationDateBasedCacheImpl.updateCacheKeys( ~[atlassian-failure-cache-plugin-0.15.jar:na]
    at com.atlassian.failurecache.ExpirationDateBasedCacheImpl.refresh( ~[atlassian-failure-cache-plugin-0.15.jar:na]
    at [atlassian-nav-links-plugin-3.3.15_1425959230000.jar:na]
    at [atlassian-nav-links-plugin-3.3.15_1425959230000.jar:na]
    at ~[sal-core-2.13.3.jar:na]
    at java.util.concurrent.Executors$ ~[na:1.7.0_25]
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset( ~[na:1.7.0_25]
    at java.util.concurrent.FutureTask.runAndReset( ~[na:1.7.0_25]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301( ~[na:1.7.0_25]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[na:1.7.0_25]
    at java.util.concurrent.ThreadPoolExecutor.runWorker( ~[na:1.7.0_25]
    at ~[na:1.7.0_25]
    ... 21 frames trimmed
Caused by: com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is not active!


When Hazelcast, the library Bitbucket Server uses for caching and many other things, detects an OutOfMemoryError it automatically shuts down.

Upon observing a lot of Full GC operations the heap size may need to be increased. The high memory consumption may also be caused by add-ons which don't manage their memory well.


Upgrade to Bitbucket Server 3.10+

In Bitbucket Server 3.10, the behavior was improved around Hazelcast and OutOfMemoryErrors - BSERV-7420 - Getting issue details... STATUS

Increase the heap size

setenv and environment variable changes in Bitbucket Server 5.0+

Starting with Bitbucket Server 5.0, and setenv.bat have been removed. The options that were set in this file can now be set via environment variables. Where to set the environment variable depends on which Operating System you're running on.


When using the atlbitbucket service on Linux, the environment variables are ignored. You must set the parameters in (or These values will be read when the service starts.

As an example, to set JVM_SUPPORT_RECOMMENDED_ARGS, you would add this line to the file:



Set the parameter as an environment variable for the user running Bitbucket Server. For example, if you want to set JVM_SUPPORT_RECOMMENDED_ARGS, create it as an environment variable and assign the appropriate value to it. When Bitbucket Server starts using the startup scripts or service, it will pick up and apply this value.


Expand to see Linux instructions

Edit <bitbucket-install>/bin/ and modify the JVM_MAXIMUM_MEMORY value to be larger.

Windows Service

Expand to see Windows Service instructions
  1. Identify the name of the service that Bitbucket Server is installed as in Windows ( Control Panel > Administrative Tools > Services ):
  2. Open the command window from Start >> Run >> type in 'cmd' >> Enter
  3. cd to the bin directory of your BITBUCKET installation directory.
  4. Run:

    tomcat8w //ES//%SERVICENAME%
  5. Click on the Java tab to see the list of current start-up options.
  6. Modify the -Xmx value to be larger.

Windows (starting from .bat file)

Click here to expand...

Edit <bitbucket-install>/bin/setenv.bat and modify the JVM_MAXIMUM_MEMORY value to be larger.

If having any 3rd party add-ons installed that could be causing this:

  1. Disable the add-on for a while.
  2. Monitor the Bitbucket Server instance, checking if the issue persists.

Some add-ons may require more memory to be used, so increasing the heap space may help in this case.

If the above doesn't help and the issue needs to be further investigated generate a Heap Dump as per the instructions in How to debug Out of Memory Heap Space and open a support ticket at

Last modified on May 4, 2017

Was this helpful?

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