Merge request stuck on "checking if merge request can be merged..."

Summary

Recently we've seen increased cases where merge requests get stuck on checks, the following messages shows for sometimes hours checking if merge request can be merged...

image

Steps to reproduce

Visit a merge request to trains on either www-gitlab-com or gitlab projects

Example Project

What is the current bug behavior?

Spinner is stuck for minutes/hours before adding to merge train is available

What is the expected correct behavior?

Check should not get stuck

Relevant logs and/or screenshots