Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Problems merging pull requests after upgrading BitBucket


We are having problems merging pull requests in one of our repositories after upgrading our BitBucket instance from version 5.16.1 to the latest, 7.1.2.


Attempting to merge a pull request in this repository will cause the merge button to show a spinner for 1 minute, after which the merge dialogue box closes, and “This page could not be displayed” is shown. On the server, a git process starts when clicking the merge button and runs for 3+ minutes. Top shows it running at 50%+ CPU, so it is doing something during that time. The output of ps -f shows the git process to be /bin/git cat-file --batch. As long as the git process is running, making another attempt at merging the pull request results in an error message saying “This pull request is already being merged”. After the process has ended, it is possible to attempt to merge the pull request again. The BitBucket logs show no errors from git or anything else.


To see if I could find out what was wrong, I made a new repository, and copied everything from the problematic repository into it. I then created a new branch, changed a single file and made a pull request. The same problem then occurred for this repository.


To make it simpler, I created another new repository, copied a single file from the problematic repository into the corresponding location in the new repo, made a new branch, changed a file and made a pull request. The same problem occurred again.


I made another new repository, and added a Hello World-file. I then made a new branch, made a change, created a pull request and successfully merged it. I then went back to master, and added all files from our problem repository. I then made a new branch, made a random change and successfully merged the pull request for that branch.


In the end, it looks like if anything in the first commit of a new repository is already in our problem repository, then pull requests in the new repository will not work. (Many files in our problem repository is already in another, older repository where pull requests work fine, this seems to fit the pattern)


Our BitBucket server runs on a Red Hat Enterprise Linux 7.5 server, using Git 2.24.1 (the problem also occurs if using git 2.23.0). It is running on the default RHEL JRE, OpenJDK


Any help and suggestions for further troubleshooting steps would be appreciated.


Best regards,

Kristian K. Skordal

Applica Consulting A/S


1 answer

Hi Kristian,

At first glance it looked like a performance issue but it is not the case when looking at your description.

How large is problem repo and how many branches are present?

It seems that git is doing a scan of your problem repo.


Lasse Langhorn


The repo where the problem occurrs is around 1Gb, with 45 branches on the BitBucket server. However, the same problem also occurs in much smaller repos (1 file, 2 branches, 1.9 Kb according to BitBucket), so I don't think that is the problem.

We also have a much larger repository where everything works fine, 6.8Gb, 157 branches.


I have not seen this issue before so I am bit curious in order to find the reason for this.

Have you tried asking Atlassian abou this issue?


Lasse Langhorn

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

Share your use cases: How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features to how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your tea...

44 views 0 1
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you