How to Increase Synchrony Heap Allocation

Still need help?

The Atlassian Community is here for you.

Ask the community

This guide only applies to managed Synchrony mode. For standalone deployments, the heap size needs to be adjusted on the start-synchrony.sh script by directly setting the Xmx value under the Optionally configure JVM section.

Purpose:

Collaborative Editing is a feature that allows multiple people to concurrently edit a single Confluence page or blog post. This feature runs on an engine called Synchrony, which spawns a separated JVM Process than the one Confluence runs with in order to handle its operations. Synchrony has its own Heap Allocation and System Arguments and sometimes, we may need to increase Synchrony Heap Allocation based on the amount of users running the engine at the same time.

Solution:

tip/resting Created with Sketch.

In order to have the changes applied here taking effect, we will need to restart our Confluence instance.


  1. Stop Confluence.
    1. To do that, open up a terminal window and browse your way to the Confluence-Installation-Directory/bin folder.
    2. Inside this very same folder, run the following command: ./stop-confluence.sh
    3. Just consult with your team first to understand if this is the script usually used or if you have customized a different one based upon your needs. If this is the case, run the customized one.
  2. Now that we stopped Confluence, under the same Confluence-Installation-Directory/bin folder, look for a file called setenv.sh.
    1. Open this file.
    2. Search for synchrony.memory.max. If you have this setup, just change its value to an appropriate allocation.
    3. If you don't have this setup, it means that the default Heap Allocation for Synchrony was applied, which, in this case, is 2GB for versions above 7.10 and 1GB for versions below it. We need to add the parameter to change the Heap Allocation. The example below sets it to 2GB, change the number to allocate as many GB's as you may need to.

      CATALINA_OPTS="-Dsynchrony.memory.max=2g ${CATALINA_OPTS}"
  3. With that done, still inside Confluence-Installation-Directory/bin, run the ./start-confluence.sh script. Don't forget to consult with your team to understand if you have customized scripts or not. In case you do, run your customized one. In case you don't, run the mentioned one.
  4. Confluence will come up with Synchrony having the new allocated Heap.


tip/resting Created with Sketch.

It is possible to set the synchrony.memory.max value in either a gigabyte or megabyte format.

When setting these values in megabytes, set the value by multiplying the desired memory level by 1024. For example, to set the memory at 2 gigabytes, configure the synchrony.memory.max to 2048m (2 x 1024MB):

-Dsynchrony.memory.max=2048m

For the same example using gigabytes, simply use the following:

-Dsynchrony.memory.max=2g

(warning) When setting the value in gigabytes, do not use .5 increments as this will cause the JVM to not start properly.

Last modified on Mar 21, 2024

Was this helpful?

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