How to manually force a full garbage collection in Confluence

Still need help?

The Atlassian Community is here for you.

Ask the community


While we do not recommend manually tuning Garbage Collection (GC) properties, manually forcing a full GC when testing memory adjustments in a development environment may become necessary.


  1. First, you will need to run Confluence through a JDK from Java version 8 or higher. In Java 8+ JDK, the jcmd utility is accessed and used to initiate the full garbage collection. (You can find this command under your $JDK_HOME/bin/)
  2. Run a jcmd command to reveal all processes and their PIDS currently running on Confluence 

  3. Review the output of processes and notate the PID located for a process running under Tomcat Catalina. In the following example the PID is 12345 

    12345 org.apache.catalina.startup.Bootstrap start
  4. Using the PID from step 3., run the following command (where xxxx is PID) to trigger the full GC: 

    jcmd xxxx
  5. The process should run and generate the following execution message: 

    Command executed successfully
Last modified on Sep 30, 2022

Was this helpful?

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