Large tmp folders in Bitbucket Data Center repository location consuming disk space
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Summary
Some repositories may grow in size in Bitbucket Data Center, and in the investigation, you could see a couple of tmp_objdir-incoming-XXXxxx stored in <repository-location-on-disk>/objects location, which are large in size.

Environment
Tested on 8.9.11. This will be applicable for other Bitbucket Data Center 8.x versions as well.
Diagnosis
The issue typically arises when the server's disk space is nearly full or after a recent power outage. After further review, you can observe that the folders were recently created. They can cause a sudden increase in the disk space usage.
Cause
The tmp_objdir-incoming-* are the quarantine directories for incoming pushes. They get created before Bitbucket actually accepts them into the repositories properly. They should automatically get deleted in ideal conditions. They can be left around if:
Server is shutdown while receiving a push.
Git process crashes while receiving a hook. This can be due to no disk space.
Solution
These files can be deleted if they are older than 24 hours to save the disk space.
But please reach out to Atlassian support to investigate the reason why this folders were left around without getting deleted.
Was this helpful?