Gitaly TooManyInvocationsError for Repository#exists? after attempting to delete project

In EE master, I attempted to delete a project that was stuck importing and saw this:

  Rendered shared/projects/_list.html.haml (1121.0ms)
  Rendered dashboard/projects/_projects.html.haml (1127.5ms)
  Rendered dashboard/projects/index.html.haml within layouts/dashboard (1260.1ms)
Completed 500 Internal Server Error in 1370ms (ActiveRecord: 13.6ms | Elasticsearch: 0.0ms)

Gitlab::GitalyClient::TooManyInvocationsError - GitalyClient#migrate called 36 times from single request. Potential n+1?
The following call site called into Gitaly 10 times:
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/gitlab/gitaly_client.rb:219:in `migrate'
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/gitlab/git/repository.rb:129:in `exists?'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/models/repository.rb:511:in `exists?'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/models/repository.rb:77:in `block (2 levels) in cache_method'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:299:in `block in fetch'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:585:in `block in save_block_result_to_cache'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:547:in `block in instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:547:in `instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:584:in `save_block_result_to_cache'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:299:in `fetch'
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/repository_cache.rb:20:in `fetch'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/models/repository.rb:1111:in `cache_method_output'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/models/repository.rb:76:in `block in cache_method'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/models/repository.rb:114:in `commit'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/models/project.rb:543:in `commit'
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/gitlab/cache/ci/project_pipeline_status.rb:10:in `commit'
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/gitlab/cache/ci/project_pipeline_status.rb:83:in `load_from_project'
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/gitlab/cache/ci/project_pipeline_status.rb:75:in `load_status'
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/gitlab/cache/ci/project_pipeline_status.rb:21:in `block in load_in_batch_for_projects'
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/gitlab/cache/ci/project_pipeline_status.rb:19:in `each'
/Users/stanhu/gitlab/gdk-ee/gitlab/lib/gitlab/cache/ci/project_pipeline_status.rb:19:in `load_in_batch_for_projects'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/helpers/projects_helper.rb:230:in `load_pipeline_status'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/views/shared/projects/_list.html.haml:14:in `_app_views_shared_projects__list_html_haml___3867941508242718321_70302373809340'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/template.rb:145:in `block in render'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/template.rb:333:in `instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/template.rb:143:in `render'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in `instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/renderer/partial_renderer.rb:309:in `render'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/renderer/renderer.rb:51:in `render_partial'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/actionview-4.2.10/lib/action_view/helpers/rendering_helper.rb:35:in `render'
/Users/stanhu/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml'
/Users/stanhu/gitlab/gdk-ee/gitlab/app/views/dashboard/projects/_projects.html.haml:1:in `_app_views_dashboard_projects__projects_html_haml___1711729579220791010_70302373658920'

development.log

Edited Jun 30, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading