Project Dashboard is causing an n+1 issue in Gitaly when checking for uncached repository avatars
Steps to recreate the problem:
- Make sure you have more than 30 repositories on your local instance.
- Clear your cache. I use
bundle exec rake cache:clear
- Visit http://localhost:3000/
The problem is that the loop over each project will call down to gitaly to check if the project has an avatar stored in the repository.
The following call site called into Gitaly 16 times:
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/gitaly_client.rb:131:in `migrate'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/git/repository.rb:1043:in `gitaly_migrate'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/git/repository.rb:84:in `root_ref'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:480:in `root_ref'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:64:in `block (2 levels) in cache_method'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:299:in `block in fetch'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:585:in `block in save_block_result_to_cache'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:547:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:547:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:584:in `save_block_result_to_cache'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:299:in `fetch'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/repository_cache.rb:20:in `fetch'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:1022:in `cache_method_output'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:63:in `block in cache_method'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:599:in `head_commit'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:610:in `tree'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:1038:in `file_on_head'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:537:in `avatar'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:64:in `block (2 levels) in cache_method'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:299:in `block in fetch'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:585:in `block in save_block_result_to_cache'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:547:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:547:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:584:in `save_block_result_to_cache'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/cache.rb:299:in `fetch'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/repository_cache.rb:20:in `fetch'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:1022:in `cache_method_output'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/repository.rb:63:in `block in cache_method'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/project.rb:908:in `avatar_in_git'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/models/project.rb:914:in `avatar_url'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/helpers/application_helper.rb:43:in `project_icon'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/views/shared/projects/_project.html.haml:20:in `block (2 levels) in _app_views_shared_projects__project_html_haml___1011026718456632260_70148956532200'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/capture_helper.rb:202:in `with_output_buffer'
/Users/andrewn/.gem/ruby/2.3.4/gems/haml-4.0.7/lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/capture_helper.rb:38:in `capture'
/Users/andrewn/.gem/ruby/2.3.4/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/tag_helper.rb:106:in `content_tag'
/Users/andrewn/.gem/ruby/2.3.4/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:61:in `content_tag_with_haml'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/url_helper.rb:184:in `link_to'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/views/shared/projects/_project.html.haml:16:in `block in _app_views_shared_projects__project_html_haml___1011026718456632260_70148956532200'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/cache_helper.rb:117:in `cache'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/views/shared/projects/_project.html.haml:13:in `_app_views_shared_projects__project_html_haml___1011026718456632260_70148956532200'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:145:in `block in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:333:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:143:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:309:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/renderer.rb:51:in `render_partial'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/rendering_helper.rb:35:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/views/shared/projects/_list.html.haml:17:in `block in _app_views_shared_projects__list_html_haml__1822588396593669195_70148961825400'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:132:in `each'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:132:in `each_with_index'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:132:in `public_send'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:132:in `method_missing'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:99:in `method_missing'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/views/shared/projects/_list.html.haml:15:in `_app_views_shared_projects__list_html_haml__1822588396593669195_70148961825400'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:145:in `block in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:333:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:143:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:309:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/renderer.rb:51:in `render_partial'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/rendering_helper.rb:35:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/views/dashboard/projects/_projects.html.haml:1:in `_app_views_dashboard_projects__projects_html_haml___650727461473282929_70149021849420'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:145:in `block in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:333:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:143:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/partial_renderer.rb:309:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/renderer.rb:51:in `render_partial'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/helpers/rendering_helper.rb:35:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/views/dashboard/projects/index.html.haml:15:in `_app_views_dashboard_projects_index_html_haml__4504724512399820977_70149047933480'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:145:in `block in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:333:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/template.rb:143:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/template_renderer.rb:52:in `render_template'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/template_renderer.rb:14:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/renderer.rb:46:in `render_template'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/renderer/renderer.rb:27:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/rendering.rb:100:in `_render_template'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/streaming.rb:217:in `_render_template'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/rendering.rb:83:in `render_to_body'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/rendering.rb:32:in `render_to_body'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/renderers.rb:37:in `render_to_body'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/abstract_controller/rendering.rb:25:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/rendering.rb:16:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/Users/andrewn/.rubies/2.3.4/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/core_ext/benchmark.rb:12:in `ms'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:43:in `render'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/mime_responds.rb:217:in `respond_to'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/controllers/dashboard/projects_controller.rb:10:in `index'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:198:in `process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/i18n.rb:47:in `with_locale'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/i18n.rb:53:in `with_user_locale'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/app/controllers/application_controller.rb:326:in `set_locale'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:432:in `block in make_lambda'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:312:in `block in halting'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `block in around'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:298:in `block in halting_and_conditional'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `block in around'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:19:in `process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:137:in `process'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionview-4.2.8/lib/action_view/rendering.rb:30:in `process'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal.rb:196:in `dispatch'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_controller/metal.rb:237:in `block in action'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:43:in `serve'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in `each'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in `serve'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:817:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/peek-performance_bar-1.3.0/lib/peek/views/performance_bar/process_utilization.rb:120:in `call'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/middleware/multipart.rb:93:in `call'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/request_profiler/middleware.rb:14:in `call'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/middleware/go.rb:17:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/flipper-0.10.2/lib/flipper/middleware/memoizer.rb:55:in `call'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/etag_caching/middleware.rb:11:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'
/Users/andrewn/.gem/ruby/2.3.4/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'
/Users/andrewn/.gem/ruby/2.3.4/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-cors-0.4.0/lib/rack/cors.rb:80:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-attack-4.4.1/lib/rack/attack.rb:107:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/etag.rb:24:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/conditionalget.rb:25:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/head.rb:13:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/flash.rb:260:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:225:in `context'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:220:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/query_cache.rb:36:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activerecord-4.2.8/lib/active_record/migration.rb:377:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/reloader.rb:73:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:84:in `protected_app_call'
/Users/andrewn/.gem/ruby/2.3.4/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:79:in `better_errors_call'
/Users/andrewn/.gem/ruby/2.3.4/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:57:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/railties-4.2.8/lib/rails/rack/logger.rb:38:in `call_app'
/Users/andrewn/.gem/ruby/2.3.4/gems/railties-4.2.8/lib/rails/rack/logger.rb:20:in `block in call'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:26:in `tagged'
/Users/andrewn/.gem/ruby/2.3.4/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `tagged'
/Users/andrewn/.gem/ruby/2.3.4/gems/railties-4.2.8/lib/rails/rack/logger.rb:20:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/sprockets-rails-3.2.0/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/request_context.rb:18:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/methodoverride.rb:22:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/runtime.rb:18:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/lock.rb:17:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/actionpack-4.2.8/lib/action_dispatch/middleware/static.rb:120:in `call'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/middleware/static.rb:9:in `call'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/middleware/webpack_proxy.rb:20:in `perform_request'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-proxy-0.6.0/lib/rack/proxy.rb:57:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/sendfile.rb:113:in `call'
/Users/andrewn/code/gitlab/gitlab-development-kit/gitlab/lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/sentry-raven-2.5.3/lib/raven/integrations/rack.rb:50:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/railties-4.2.8/lib/rails/engine.rb:518:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/railties-4.2.8/lib/rails/application.rb:165:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `public_send'
/Users/andrewn/.gem/ruby/2.3.4/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `method_missing'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/urlmap.rb:66:in `block in call'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in `each'
/Users/andrewn/.gem/ruby/2.3.4/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in `call'
/Users/andrewn/.gem/ruby/2.3.4/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client'
/Users/andrewn/.gem/ruby/2.3.4/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop'
/Users/andrewn/.gem/ruby/2.3.4/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
/Users/andrewn/.gem/ruby/2.3.4/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:132:in `start'
/Users/andrewn/.gem/ruby/2.3.4/gems/unicorn-5.1.0/bin/unicorn_rails:209:in `<top (required)>'
/Users/andrewn/.gem/ruby/2.3.4/bin/unicorn_rails:22:in `load'
/Users/andrewn/.gem/ruby/2.3.4/bin/unicorn_rails:22:in `<top (required)>'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/cli/exec.rb:74:in `load'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/cli/exec.rb:27:in `run'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/cli.rb:365:in `exec'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/cli.rb:22:in `dispatch'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/cli.rb:13:in `start'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/exe/bundle:30:in `block in <top (required)>'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/Users/andrewn/.gem/ruby/2.3.4/gems/bundler-1.15.3/exe/bundle:22:in `<top (required)>'
/Users/andrewn/.gem/ruby/2.3.4/bin/bundle:22:in `load'
/Users/andrewn/.gem/ruby/2.3.4/bin/bundle:22:in `<main>'