503 errors thrown due to Gitaly Deadlines Exceeded
Summary
A lot of calls come back with 503, the log always seems to refer to Gitaly Dealines being exceeded
Steps to reproduce
E.g. show the wiki main page
What is the current bug behavior?
503s thrown
What is the expected correct behavior?
Wiki page shown
Relevant logs and/or screenshots
gitaly log excerpt
2019-03-21_12:03:55.79108 time="2019-03-21T12:03:55Z" level=warning msg="health check failed" error="rpc error: code = DeadlineExceeded desc = Deadline Exceeded" worker.name=gitaly-ruby.1
production.log excerpts
Gitlab::Git::CommandError (4:Deadline Exceeded):
lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
lib/gitlab/git/wiki.rb:112:in `page_versions'
app/models/wiki_page.rb:143:in `versions'
app/models/wiki_page.rb:153:in `last_version'
app/views/projects/wikis/show.html.haml:14:in `_app_views_projects_wikis_show_html_haml___2820968397200857216_70004746019300'
app/controllers/application_controller.rb:113:in `render'
app/controllers/projects/wikis_controller.rb:29:in `show'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:423:in `set_locale'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
ee/lib/gitlab/jira/middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:42:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:20:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
lib/gitlab/middleware/release_env.rb:13:in `call'
Gitlab::Git::CommandError (4:Deadline Exceeded):
lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
lib/gitlab/git/wiki.rb:96:in `page'
app/models/project_wiki.rb:99:in `find_page'
app/models/project_wiki.rb:105:in `find_sidebar'
app/controllers/projects/wikis_controller.rb:115:in `load_project_wiki'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:423:in `set_locale'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
ee/lib/gitlab/jira/middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:42:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:20:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
lib/gitlab/middleware/release_env.rb:13:in `call'
Gitlab::Git::CommandError (4:Deadline Exceeded):
lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
lib/gitlab/git/blob.rb:79:in `batch_lfs_pointers'
lib/extracts_path.rb:146:in `lfs_blob_ids'
app/controllers/projects/tree_controller.rb:31:in `block (2 levels) in show'
app/controllers/projects/tree_controller.rb:29:in `show'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:423:in `set_locale'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
ee/lib/gitlab/jira/middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:42:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:20:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
lib/gitlab/middleware/release_env.rb:13:in `call'
Gitlab::Git::CommandError (4:Deadline Exceeded):
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/repository.rb:190:in `tags'
/opt/gitlab/embedded/service/gitlab-rails/app/models/repository.rb:794:in `tags'
/opt/gitlab/embedded/service/gitlab-rails/app/models/repository.rb:182:in `find_tag'
/opt/gitlab/embedded/service/gitlab-rails/app/models/release.rb:51:in `block in actual_tag'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize'
/opt/gitlab/embedded/service/gitlab-rails/app/models/release.rb:50:in `actual_tag'
/opt/gitlab/embedded/service/gitlab-rails/app/models/release.rb:46:in `actual_sha'
/opt/gitlab/embedded/service/gitlab-rails/app/models/release.rb:25:in `block in commit'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize'
/opt/gitlab/embedded/service/gitlab-rails/app/models/release.rb:24:in `commit'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/delegator/plain_object.rb:8:in `delegate'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/entity.rb:512:in `delegate_attribute'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/delegator_exposure.rb:8:in `value'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/represent_exposure.rb:27:in `value'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/base.rb:82:in `valid_value'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/base.rb:66:in `serializable_value'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/nesting_exposure.rb:41:in `block in serializable_value'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/nesting_exposure.rb:120:in `block (2 levels) in map_entity_exposures'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/base.rb:116:in `block in with_attr_path'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/options.rb:90:in `with_attr_path'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/base.rb:115:in `with_attr_path'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/nesting_exposure.rb:119:in `block in map_entity_exposures'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/nesting_exposure.rb:118:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/nesting_exposure.rb:118:in `each_with_object'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/nesting_exposure.rb:118:in `map_entity_exposures'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/exposure/nesting_exposure.rb:40:in `serializable_value'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/grape-entity-0.7.1/lib/grape_entity/entity.rb:489:in `serializable_hash'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/core_ext/object/json.rb:142:in `block in as_json'
GRPC::DeadlineExceeded (4:Deadline Exceeded):
lib/gitlab/gitaly_client/commit_service.rb:372:in `each'
lib/gitlab/gitaly_client/commit_service.rb:372:in `get_commit_signatures'
lib/gitlab/git/commit.rb:166:in `batch_signature_extraction'
lib/gitlab/git/commit.rb:159:in `block in extract_signature_lazily'
lib/gitlab/gpg/commit.rb:17:in `block in signature_text'
lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize'
lib/gitlab/gpg/commit.rb:16:in `signature_text'
lib/gitlab/gpg/commit.rb:28:in `has_signature?'
app/models/commit.rb:333:in `has_signature?'
app/models/commit_collection.rb:20:in `each'
app/models/commit_collection.rb:20:in `each'
app/controllers/projects/commits_controller.rb:45:in `select'
app/controllers/projects/commits_controller.rb:45:in `block (2 levels) in signatures'
app/controllers/projects/commits_controller.rb:42:in `signatures'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:423:in `set_locale'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
ee/lib/gitlab/jira/middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:42:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:20:in `call'
Results of GitLab environment info
System information
System: Ubuntu 16.04
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.5.3p105
Gem Version: 2.7.6
Bundler Version:1.16.6
Rake Version: 12.3.2
Redis Version: 3.2.12
Git Version: 2.18.1
Sidekiq Version:5.2.5
Go Version: go1.6.2 linux/amd64
GitLab information
Version: 11.8.2-ee
Revision: 4618789
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
DB Version: 9.6.11
URL: https://dev.dedrone.com
HTTP Clone URL: https://dev.dedrone.com/some-group/some-project.git
SSH Clone URL: git@dev.dedrone.com:some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 8.4.4
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 8.4.4 ? ... OK (8.4.4)
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished [137/9022]
Checking Sidekiq ...
Sidekiq: ... Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Checking Reply by email ...
IMAP server credentials are correct? ... yes
Init.d configured correctly? ... skipped
MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ...
4/3 ... yes [93/9022]
1/4 ... yes
3/5 ... yes
3/6 ... yes
31/8 ... yes
4/10 ... yes
1/11 ... yes
4/12 ... yes
25/13 ... yes
31/14 ... yes
31/15 ... yes
31/16 ... yes
30/20 ... yes
30/21 ... yes
31/22 ... yes
25/23 ... yes
25/25 ... yes
1/29 ... yes
27/30 ... yes
27/33 ... yes
10/34 ... yes
35/35 ... yes
1/36 ... yes
4/38 ... yes
4/39 ... yes
4/40 ... yes
4/41 ... yes
4/42 ... yes
4/44 ... yes
42/46 ... yes
42/47 ... yes
42/48 ... yes
42/49 ... yes
42/50 ... yes
42/51 ... yes
42/52 ... yes
42/53 ... yes
42/54 ... yes
42/55 ... yes
42/56 ... yes
42/57 ... yes
42/58 ... yes
42/59 ... yes
42/60 ... yes
42/61 ... yes
42/62 ... yes
42/63 ... yes
42/64 ... yes
42/65 ... yes [45/9022]
42/66 ... yes
25/71 ... yes
27/72 ... yes
52/74 ... yes
25/75 ... yes
27/76 ... yes
42/77 ... yes
27/78 ... yes
42/79 ... yes
25/80 ... yes
4/81 ... yes
42/82 ... yes
42/83 ... yes
42/84 ... yes
42/85 ... yes
42/86 ... yes
42/87 ... yes
42/88 ... yes
4/89 ... yes
4/90 ... yes
27/91 ... yes
65/92 ... yes
4/93 ... yes
42/94 ... yes
27/95 ... yes
42/97 ... yes
42/98 ... yes
27/99 ... yes
27/100 ... yes
51/103 ... yes
27/104 ... yes
27/106 ... yes
27/107 ... yes
74/108 ... yes
4/109 ... yes
4/110 ... yes
3/111 ... yes
1/112 ... yes
42/113 ... yes
4/114 ... yes
42/115 ... yes
51/116 ... yes
51/117 ... yes
42/118 ... yes
27/119 ... yes
27/120 ... yes
51/121 ... yes
51/121 ... yes
41/122 ... yes
51/123 ... yes
27/124 ... yes
42/125 ... yes
42/126 ... yes
27/127 ... yes
4/128 ... yes
27/129 ... yes
79/131 ... yes
4/132 ... yes
51/133 ... yes
51/134 ... yes
4/135 ... yes
27/136 ... yes
25/137 ... yes
86/138 ... yes
51/139 ... yes
4/140 ... yes
4/141 ... yes
27/142 ... yes
42/143 ... yes
42/146 ... yes
42/147 ... yes
27/148 ... yes
42/149 ... yes
27/150 ... yes
4/151 ... yes
25/152 ... yes
42/154 ... yes
3/155 ... yes
4/156 ... yes
75/157 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.5 ? ... yes (2.5.3)
Git version >= 2.18.0 ? ... yes (2.18.1)
Git user has default SSH configuration? ... yes
Active users: ... 56
Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Edited by Frederic Beister