Transferring a project results in 500 statement timeout
I tried to transfer a project from https://gitlab.com/gitlab-org/cluster-integration/kubernetes-management-ng/gitlab-agent/ to https://gitlab.com/gitlab-org/cluster-integration/ and got a PG::QueryCanceled: ERROR: canceling statement due to statement timeout
Stack trace:
app/services/labels/transfer_service.rb:19:in `block in execute', app/services/labels/transfer_service.rb:18:in `execute', app/services/projects/transfer_service.rb:75:in `block in attempt_transfer_transaction', app/services/projects/transfer_service.rb:63:in `attempt_transfer_transaction', app/services/projects/transfer_service.rb:58:in `transfer', ee/app/services/ee/projects/transfer_service.rb:29:in `transfer', app/services/projects/transfer_service.rb:27:in `execute', app/controllers/projects_controller.rb:100:in `transfer', ee/lib/gitlab/ip_address_state.rb:10:in `with', ee/app/controllers/ee/application_controller.rb:44:in `set_current_ip_address', app/controllers/application_controller.rb:496:in `set_current_admin', lib/gitlab/session.rb:11:in `with_session', app/controllers/application_controller.rb:487:in `set_session_storage', app/controllers/application_controller.rb:481:in `set_locale', lib/gitlab/error_tracking.rb:48:in `with_context', app/controllers/application_controller.rb:546:in `sentry_context', app/controllers/application_controller.rb:474:in `block in set_current_context', lib/gitlab/application_context.rb:52:in `block in use', lib/gitlab/application_context.rb:52:in `use', lib/gitlab/application_context.rb:20:in `with_context', app/controllers/application_controller.rb:467:in `set_current_context', ee/lib/omni_auth/strategies/group_saml.rb:41:in `other_phase', ee/lib/gitlab/jira/middleware.rb:19:in `call'