After migrating Perforce repository to Git, Bitbucket starts to have performance issues.
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Upon migrating a large Perforce repository to Git, users notice performance issues almost immediately. The affects are:
- slow notifications/emails of PR comments;
- CI scanning for builds has timed out.
Environment
- Bitbucket Server/DC
- Code Owners for Bitbucket
Diagnosis
Errors in Log Files
The below error is spread through the logs and relates to different repositories:
2021-10-08 10:23:03,112 ERROR [threadpool:thread-22] username @1W5AUGIx402x454672x6 10.10.10.150,127.0.0.1 "POST /projects/PRJ/repos/test-repo/pull-requests HTTP/1.0" c.m.b.c.p.PullRequestListener CODEOWNERS: failed to run async
... 34 frames trimmed
at java.lang.Thread.run(Thread.java:748)
HW consumption
There also may be high CPU usage on the Bitbucket server when affected by the issue. You can check this by running top
on Linux or Task Manager
on Windows.
Cause
This error relates to Code Owners for Bitbucket Server plugin. An old version of the plugin is being used in which a performance issue existed.
Solution
Upgrade plugin to its latest version—at least 3.1.4. There are few performance improvements in the latest releases of the plugin.