Clones fail with suboptimal pack - out of memory

お困りですか?

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

コミュニティに質問

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

    

要約

When attempting to clone a repository being hosted via Bitbucket Server/Data Center, the clone fails.

環境

  • Any version of Bitbucket Server or Bitbucket Data Center
  • Any git version
  • The below error will be printed for any standard git clone command issued via the command line, but the clone will fail for any git client used to complete the clone - though possibly with a different error.
  • It's likely that only certain repositories are impacted (namely large repositories).

診断

The following can be seen in the console after running the standard git clone command against this repository:

remote: warning: suboptimal pack - out of memory
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

The above error likely does not occur, however, for smaller repositories - such as a new repository with no files added to it yet.

原因

The above error can be seen for a variety of reasons, such as a large repository or not enough system resources - namely to where git is unable to create the pack files necessary to complete the clone operation.

ソリューション

Lower the pack size limit and window memory with the following steps.

  1. Locate the repository on disk. The path to the repository should be in the "Repository Settings" on the repository page in the Bitbucket UI.
  2. Navigate to that location
  3. Run the following

    git config pack.windowMemory 1g
    git config pack.packSizeLimit 2g
  4. If the clone still fails, lower the values until you are able to clone.

These changes will survive Bitbucket restarts.

If you continue to receive an "early EOF" error that doesn't include the previous lines with "suboptimal pack - out of memory", it's recommended you also review the following knowledge article along with the other 'early EOF' errors listed in our Troubleshooting Git documentation:

最終更新日: 2021 年 1 月 19 日

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

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