Set heap size for Java on Bitbucket Server and Data Center

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 は除く

要約

Sometimes, you might need to change JVM parameters for heap size on Bitbucket (Xms and Xmx). To do this, edit the files and restart Bitbucket to apply the changes.

環境

Applies to Bitbucket on-premise installations on Windows and Linux environments.

ソリューション

Windows の場合

Take the following steps:

  1. Through the command line, go to the Bitbucket binary folder: cd <Bitbucket Server installation directory>\bin.
  2. Access the Bitbucket process: bservmgr.exe //ES//AtlassianBitbucket.
  3. In the pop-up window, select the Java tab and edit the Initial Memory Pool and Maximum Memory Pool values.

Linux の場合

Method 1 RECOMMENDED

Set and export the JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY environment variables at the OS level. This will preserve the set values that may otherwise be overwritten by Bitbucket upgrade activities. 

方法 2

warning The following configuration changes will only affect currently installed Bitbucket version.
They will need to be re-applied after each upgrade.

  1. Through the command line, go to the Bitbucket binary folder: cd <Bitbucket Server installation directory>/bin.
  2. Open the Bitbucket Webapp process: vi _start-webapp.sh.
  3. Edit the JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY values.

# The following 2 settings control the minimum and maximum memory allocated to the Java virtual machine.
# For larger instances, the maximum amount will need to be increased.
#
if [ -z "${JVM_MINIMUM_MEMORY}" ]; then
    JVM_MINIMUM_MEMORY=512m
fi
if [ -z "${JVM_MAXIMUM_MEMORY}" ]; then
    JVM_MAXIMUM_MEMORY=1g
fi
最終更新日: 2024 年 12 月 19 日

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

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