Going to the vulnerability report page returns an error

Summary

Going to the vulnerability report page returns an error.

Steps to reproduce

  • Have a lot of reports
  • Go to security and compliance menu > vulnerability report
  • See error

Example Project

What is the current bug behavior?

An error is returned and the dashboard is empty

Screenshot_2022-07-05_at_10.20.31_AM

What is the expected correct behavior?

Data being populated

Relevant logs and/or screenshots

PG::QueryCanceled: ERROR:  canceling statement due to statement timeout

  lib/gitlab/graphql/tracers/timer_tracer.rb:20:in `trace'
    yield
  lib/gitlab/graphql/generic_tracing.rb:48:in `with_labkit_tracing'
    return yield unless Labkit::Tracing.enabled?
  lib/gitlab/graphql/generic_tracing.rb:38:in `platform_trace'
    with_labkit_tracing(tags, &block)
  lib/gitlab/graphql/tracers/logger_tracer.rb:14:in `trace'
    yield
  lib/gitlab/graphql/tracers/metrics_tracer.rb:13:in `trace'
    result = yield
...
(245 additional frame(s) were not displayed)

ActiveRecord::QueryCanceled: PG::QueryCanceled: ERROR:  canceling statement due to statement timeout

https://sentry.gitlab.net/gitlab/gitlabcom/issues/3313692/events/a0d6f7cc73f04a8487a5cc3d375ee858/

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by Thiago Figueiró