Garbage Collection log settings for Bitbucket Server and Data Center 6+ when using Java version 11

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

問題

Since Java 9, the garbage collection JVM arguments have changed, as the Unified JVM Logging has been introduced. Using GC arguments such as those supported in Java 8 such as:

-Xloggc:<PATH_TO_GC_LOGS>
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintGCCause
-XX:+UseG1GC
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=5
-XX:GCLogFileSize=20M

Bitbucket will not start, as the JVM will fail with errors:

Unrecognized VM option 'UseGCLogFileRotation'
 Error: Could not create the Java Virtual Machine.
 Error: A fatal exception has occurred. Program will exit.

診断

環境

  • AdoptOpen JDK 11 

ソリューション

To map old GC flags to the new ones you can reference 43 GC logging flags removed from Java 9. The following Java flags are no longer supported in Java 9 and upwards, as the Unified JVM Logging has been introduced:

-Xloggc:<PATH_TO_GC_LOGS>
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintGCCause
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=5
-XX:GCLogFileSize=20M


Please ensure you append the following entry to continue logging the Garbage Collection (GC) activity. This should be added to the <Bitbucket-installation-directory>/bin/_start-webapp.sh. The entry should be assigned as a value for the JVM_SUPPORT_RECOMMENDED_ARGS  parameter:

JVM_SUPPORT_RECOMMENDED_ARGS="-Xlog:gc*:file=$BITBUCKET_HOME/log/gc-%t.log:tags,time,uptime,level:filecount=10,filesize=5M"

(info) If you existing value assigned for JVM_SUPPORT_RECOMMENDED_ARGS, please append the values.




最終更新日 2024 年 8 月 23 日

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

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