Cannot transfer project to another group due to 'Gitlab::RequestContext::RequestDeadlineExceeded' error

Summary

User is not able to transfer a project to a different namespace. They are getting the following error message despite meeting the prerequisites we have in place.

"exception.message": "Request takes longer than 57 seconds",
"exception.class": "Gitlab::RequestContext::RequestDeadlineExceeded",
...
      "exception.backtrace": [
        "lib/gitlab/request_context.rb:47:in `ensure_deadline_not_exceeded!'",
        "lib/gitlab/gitaly_client.rb:180:in `execute'",
        "lib/gitlab/gitaly_client/call.rb:18:in `block in call'",
        "lib/gitlab/gitaly_client/call.rb:60:in `recording_request'",
        "lib/gitlab/gitaly_client/call.rb:17:in `call'",
        "lib/gitlab/gitaly_client.rb:175:in `call'",
        "lib/gitlab/gitaly_client/with_feature_flag_actors.rb:31:in `block in gitaly_client_call'",
        "lib/gitlab/gitaly_client.rb:541:in `with_feature_flag_actors'",
        "lib/gitlab/gitaly_client/with_feature_flag_actors.rb:25:in `gitaly_client_call'",
        "lib/gitlab/gitaly_client/repository_service.rb:22:in `exists?'",
        "lib/gitlab/git/repository.rb:103:in `exists?'",
        "lib/gitlab/git/repository.rb:1053:in `set_full_path'",
        "app/models/project.rb:2288:in `set_full_path'",
        "app/services/projects/transfer_service.rb:204:in `update_repository_configuration'",
        "app/services/projects/transfer_service.rb:241:in `rollback_side_effects'",
        "app/services/projects/transfer_service.rb:153:in `rescue in proceed_to_transfer'",
        "app/services/projects/transfer_service.rb:152:in `proceed_to_transfer'",
        "app/services/projects/transfer_service.rb:104:in `transfer'",
        "app/services/projects/transfer_service.rb:45:in `execute'",
        "app/controllers/projects_controller.rb:133:in `transfer'",
        "ee/lib/gitlab/ip_address_state.rb:10:in `with'",
        "ee/app/controllers/ee/application_controller.rb:45:in `set_current_ip_address'",
        "app/controllers/application_controller.rb:520:in `set_current_admin'",
        "lib/gitlab/session.rb:11:in `with_session'",
        "app/controllers/application_controller.rb:511:in `set_session_storage'",
        "lib/gitlab/i18n.rb:107:in `with_locale'",
        "lib/gitlab/i18n.rb:113:in `with_user_locale'",
        "app/controllers/application_controller.rb:502:in `set_locale'",
        "app/controllers/application_controller.rb:495:in `set_current_context'",
        "ee/lib/omni_auth/strategies/group_saml.rb:41:in `other_phase'",
        "lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'",
        "lib/gitlab/middleware/memory_report.rb:13:in `call'",
        "lib/gitlab/middleware/speedscope.rb:13:in `call'",
        "lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'",
        "lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'",
        "lib/gitlab/etag_caching/middleware.rb:21:in `call'",
        "lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'",
        "lib/gitlab/metrics/web_transaction.rb:46:in `run'",
        "lib/gitlab/metrics/rack_middleware.rb:16:in `call'",
        "lib/gitlab/jira/middleware.rb:19:in `call'",
        "lib/gitlab/middleware/go.rb:20:in `call'",
        "lib/gitlab/middleware/query_analyzer.rb:11:in `block in call'",
        "lib/gitlab/database/query_analyzer.rb:37:in `within'",
        "lib/gitlab/middleware/query_analyzer.rb:11:in `call'",
        "lib/gitlab/middleware/multipart.rb:173:in `call'",
        "lib/gitlab/middleware/read_only/controller.rb:50:in `call'",
        "lib/gitlab/middleware/read_only.rb:18:in `call'",
        "lib/gitlab/middleware/same_site_cookies.rb:27:in `call'",
        "lib/gitlab/middleware/path_traversal_check.rb:25:in `call'",
        "lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'",
        "lib/gitlab/middleware/basic_health_check.rb:25:in `call'",
        "lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'",
        "lib/gitlab/middleware/request_context.rb:15:in `call'",
        "lib/gitlab/middleware/webhook_recursion_detection.rb:15:in `call'",
        "config/initializers/fix_local_cache_middleware.rb:11:in `call'",
        "lib/gitlab/middleware/compressed_json.rb:44:in `call'",
        "lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'",
        "lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'",
        "lib/gitlab/metrics/requests_rack_middleware.rb:79:in `call'",
        "lib/gitlab/middleware/release_env.rb:13:in `call'"

Steps to reproduce

  • Access the project that you want to transfer.
  • Click on Settings > General > Advanced > Transfer project.
  • Set the new namespace you want to move the project to.
  • Confirm transfer.

Example Project

What is the current bug behavior?

Project transfer is not started/fails with 500 error response.

What is the expected correct behavior?

Project transfer should complete without any errors.

Relevant logs and/or screenshots

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

Workaround

Transfer the project using the rails console:

Edited by 🤖 GitLab Bot 🤖