JVM 引数をメッシュ サイドカーに渡す方法

お困りですか?

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

コミュニティに質問

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

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.

*Fisheye および Crucible は除く

目的

As of Bitbucket 8.0, Git operations are now run in the mesh sidecar. This sidecar JVM is launched as a child process directly from the Bitbucket JVM, and therefore does not have startup scripts. This means users have to configure the sidecar JVM options through bitbucket.properties in Bitbucket data center for items such as JMX settings, heap dump, or gc logging configuration and the sidecar process will inherit these settings.

ソリューション

This configuration only affects the mesh sidecar and does not propagate to any remote mesh nodes. Remote mesh nodes will have startup scripts in the <Mesh-install>/bin/ folder, and you can update JVM arguments in the _start-mesh.sh file under JVM_SUPPORT_RECOMMENDED_ARGS  - similar to Bitbucket

More details on setting up a remote Mesh node can be found in 
Set up and configure Mesh nodes

以下の行を bitbucket.properties ファイルに追加し、メッシュサイドカーに受け取らせたい引数を追加します。次回 Bitbucket とサイドカーが起動した時に、これらの変更が反映されます。

# Pass custom JVM arguments on the command line used to start the Mesh sidecar process. Values set here will be
# passed as the final arguments such that they can be used to override pre-set values where applicable.
# Note: The list index (i.e. the number in square brackets) must start at zero and must be contiguous.
plugin.bitbucket-git.mesh.sidecar.jvm-args[0]=-verbose:gc
plugin.bitbucket-git.mesh.sidecar.jvm-args[1]=-XX:+HeapDumpOnOutOfMemoryError

さらに、ヒープサイズの最大値 (Xmx) と最小値 (Xms) を設定するための別のプロパティがあります。その概要を以下に示します。

# The heap size of the Mesh sidecar process. The configured size is applied as both the minimum (`-Xms`) and
# maximum (`-Xmx`) heap size for the sidecar process. Be aware that the sidecar requires only limited memory, even
# under highly concurrent load. Oversized heaps can result in worse performance as a result of large gc pauses. To
# prevent this, a hard limit of 2G is applied to the configured memory.
#
# This value is in megabytes.
plugin.bitbucket-git.mesh.sidecar.heap-size=768

これらの項目を bitbucket.properties に適用して Bitbucket (および実質的にメッシュ サイドカー) を再起動すると、これらの変更が反映されます。

説明
製品

最終更新日 2024 年 6 月 14 日

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

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