Pipelines API responding status 500 after 1 minute for some pipelines

Summary

Hi, we have been encountering pipelines API returning 500 for some pipelines pages and when we try going into the pipeline details, we're getting status 500 after 1 minute

Steps to reproduce

  1. Go to the pipelines page
  2. Click on one of the pipelines
  3. Most pipelines will open, but some of the pipelines return 500 after a minute

Example Project

https://gitlab.com/bibecoffee/dev-team/backend/bibecoffee-backend

Example pipeline which takes more than 1 minute to open: https://gitlab.com/bibecoffee/dev-team/backend/bibecoffee-backend/-/pipelines/1043475000

What is the current bug behavior?

We are not able to open the pipeline details because we're getting 500

What is the expected correct behavior?

We should be able to go to the pipeline details without having 500

Relevant logs and/or screenshots

image.png

Output of checks

GitLab environment info

We're using gitlab.com with private repositories

Possible fixes