How to manually force a full garbage collection in Confluence

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

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 

    jcmd
  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 GC.run
  5. The process should run and generate the following execution message: 

    Command executed successfully
最終更新日 2022 年 9 月 30 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.