Merge button infinite delay

We are fairly consistently seeing a problem where the “merge” button on the merge requests page never becomes available - it will sit there indefinitely with the message " `Checking if merge request can be merged…". If we do nothing, the merge button never becomes active. After a few minutes, if the page is manually refreshed it will usually become available, but only after a manual refresh. Merges will complete normally. This occurs anytime we navigate to a merge request on a project that has a large number of files and/or a long history. Smaller projects do not seem to be affected, as if the larger ones are exceeding some timeout limit. Is there some setting that can improve this behavior?

Running Gitlab CE using the official, unmodified Docker container on Docker 20.10.11, RHEL7. Gitlab version 14.6.1 but the issue goes back many months with previous releases.

@mark.tucker what you describe sounds like a bug. Would you mind opening an issue so our team can look into it?

https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Bug

Posted on gitlab.com #350274