Commit a3757513 authored by Evan Read's avatar Evan Read Committed by Simon Knox

Improve Gitaly timeouts UI text and documentation

parent ac219b48
...@@ -3,25 +3,19 @@ ...@@ -3,25 +3,19 @@
%fieldset %fieldset
.form-group .form-group
= f.label :gitaly_timeout_default, _('Default Timeout Period'), class: 'label-bold' = f.label :gitaly_timeout_default, _('Default timeout'), class: 'label-bold'
= f.number_field :gitaly_timeout_default, class: 'form-control gl-form-input' = f.number_field :gitaly_timeout_default, class: 'form-control gl-form-input'
.form-text.text-muted .form-text.text-muted
Timeout for Gitaly calls from the GitLab application (in seconds). This timeout is not enforced = _('Timeout for most Gitaly operations (in seconds).')
for git fetch/push operations or Sidekiq jobs.
This timeout should be less than the worker timeout. If a Gitaly call timeout would exceed the
worker timeout, the remaining time from the worker timeout would be used to avoid having to terminate
the worker.
.form-group .form-group
= f.label :gitaly_timeout_fast, _('Fast Timeout Period'), class: 'label-bold' = f.label :gitaly_timeout_fast, _('Fast timeout'), class: 'label-bold'
= f.number_field :gitaly_timeout_fast, class: 'form-control gl-form-input' = f.number_field :gitaly_timeout_fast, class: 'form-control gl-form-input'
.form-text.text-muted .form-text.text-muted
Fast operation timeout (in seconds). Some Gitaly operations are expected to be fast. = _('Timeout for the fastest Gitaly operations (in seconds).')
If they exceed this threshold, there may be a problem with a storage shard and 'failing fast'
can help maintain the stability of the GitLab instance.
.form-group .form-group
= f.label :gitaly_timeout_medium, _('Medium Timeout Period'), class: 'label-bold' = f.label :gitaly_timeout_medium, _('Medium timeout'), class: 'label-bold'
= f.number_field :gitaly_timeout_medium, class: 'form-control gl-form-input' = f.number_field :gitaly_timeout_medium, class: 'form-control gl-form-input'
.form-text.text-muted .form-text.text-muted
Medium operation timeout (in seconds). This should be a value between the Fast and the Default timeout. = _('Timeout for moderately fast Gitaly operations (in seconds). Provide a value between Default timeout and Fast timeout.')
= f.submit _('Save changes'), class: "gl-button btn btn-confirm" = f.submit _('Save changes'), class: "gl-button btn btn-confirm"
...@@ -60,11 +60,13 @@ ...@@ -60,11 +60,13 @@
%section.settings.as-gitaly.no-animate#js-gitaly-settings{ class: ('expanded' if expanded_by_default?) } %section.settings.as-gitaly.no-animate#js-gitaly-settings{ class: ('expanded' if expanded_by_default?) }
.settings-header .settings-header
%h4 %h4
= _('Gitaly') = _('Gitaly timeouts')
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
= expanded_by_default? ? _('Collapse') : _('Expand') = expanded_by_default? ? _('Collapse') : _('Expand')
%p %p
= _('Configure Gitaly timeouts.') = _('Configure Gitaly timeouts.')
%span
= link_to _('Learn more.'), help_page_path('user/admin_area/settings/gitaly_timeouts.md'), target: '_blank'
.settings-content .settings-content
= render 'gitaly' = render 'gitaly'
......
...@@ -8,23 +8,20 @@ type: reference ...@@ -8,23 +8,20 @@ type: reference
# Gitaly timeouts **(FREE SELF)** # Gitaly timeouts **(FREE SELF)**
[Gitaly](../../../administration/gitaly/index.md) timeouts are configurable. The timeouts can be [Gitaly](../../../administration/gitaly/index.md) timeouts are configurable. The timeouts can be
configured to make sure that long running Gitaly calls don't needlessly take up resources. configured to make sure that long-running Gitaly calls don't needlessly take up resources.
To access Gitaly timeout settings: To access Gitaly timeout settings:
1. On the top bar, select **Menu >** **{admin}** **Admin**. 1. On the top bar, select **Menu >** **{admin}** **Admin**.
1. On the left sidebar, select **Settings > Preferences**. 1. On the left sidebar, select **Settings > Preferences**.
1. Expand the **Gitaly** section. 1. Expand the **Gitaly timeouts** section.
## Available timeouts ## Available timeouts
The following timeouts can be modified: The following timeouts are available.
- **Default Timeout Period**. This timeout is the default for most Gitaly calls. It should be shorter than the | Timeout | Default | Description |
worker timeout that can be configured for [Puma](https://docs.gitlab.com/omnibus/settings/puma.html#puma-settings). |:--------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Used to make sure that Gitaly calls made within a web request cannot exceed the entire request timeout. | Default | 55 seconds | Timeout for most Gitaly calls (not enforced for `git` `fetch` and `push` operations, or Sidekiq jobs). For example, checking if a repository exists on disk. Makes sure that Gitaly calls made within a web request cannot exceed the entire request timeout. It should be shorter than the worker timeout that can be configured for [Puma](https://docs.gitlab.com/omnibus/settings/puma.html#puma-settings). If a Gitaly call timeout exceeds the worker timeout, the remaining time from the worker timeout is used to avoid having to terminate the worker. |
Defaults to 55 seconds. | Fast | 10 seconds | Timeout for fast Gitaly operations used within requests, sometimes multiple times. For example, checking if a repository exists on disk. If fast operations exceed this threshold, there may be a problem with a storage shard. Failing fast can help maintain the stability of the GitLab instance. |
| Medium | 30 seconds | Timeout for Gitaly operations that should be fast (possibly within requests) but preferably not used multiple times within a request. For example, loading blobs. Timeout that should be set between Default and Fast. |
- **Fast Timeout Period**. This is the timeout for very short Gitaly calls. Defaults to 10 seconds.
- **Medium Timeout Period**. This timeout should be between the default and the fast timeout.
Defaults to 30 seconds.
...@@ -10278,9 +10278,6 @@ msgstr "" ...@@ -10278,9 +10278,6 @@ msgstr ""
msgid "Default CI/CD configuration file" msgid "Default CI/CD configuration file"
msgstr "" msgstr ""
msgid "Default Timeout Period"
msgstr ""
msgid "Default artifacts expiration" msgid "Default artifacts expiration"
msgstr "" msgstr ""
...@@ -10317,6 +10314,9 @@ msgstr "" ...@@ -10317,6 +10314,9 @@ msgstr ""
msgid "Default projects limit" msgid "Default projects limit"
msgstr "" msgstr ""
msgid "Default timeout"
msgstr ""
msgid "Default: Map a FogBugz account ID to a full name" msgid "Default: Map a FogBugz account ID to a full name"
msgstr "" msgstr ""
...@@ -13527,7 +13527,7 @@ msgstr "" ...@@ -13527,7 +13527,7 @@ msgstr ""
msgid "False positive" msgid "False positive"
msgstr "" msgstr ""
msgid "Fast Timeout Period" msgid "Fast timeout"
msgstr "" msgstr ""
msgid "Fast-forward merge is not possible. Rebase the source branch onto %{targetBranch} to allow this merge request to be merged." msgid "Fast-forward merge is not possible. Rebase the source branch onto %{targetBranch} to allow this merge request to be merged."
...@@ -14989,9 +14989,6 @@ msgstr "" ...@@ -14989,9 +14989,6 @@ msgstr ""
msgid "GitLabPages|Your pages are served under:" msgid "GitLabPages|Your pages are served under:"
msgstr "" msgstr ""
msgid "Gitaly"
msgstr ""
msgid "Gitaly Servers" msgid "Gitaly Servers"
msgstr "" msgstr ""
...@@ -15001,6 +14998,9 @@ msgstr "" ...@@ -15001,6 +14998,9 @@ msgstr ""
msgid "Gitaly storage name:" msgid "Gitaly storage name:"
msgstr "" msgstr ""
msgid "Gitaly timeouts"
msgstr ""
msgid "Gitaly|Address" msgid "Gitaly|Address"
msgstr "" msgstr ""
...@@ -20165,7 +20165,7 @@ msgstr "" ...@@ -20165,7 +20165,7 @@ msgstr ""
msgid "Measured in bytes of code. Excludes generated and vendored code." msgid "Measured in bytes of code. Excludes generated and vendored code."
msgstr "" msgstr ""
msgid "Medium Timeout Period" msgid "Medium timeout"
msgstr "" msgstr ""
msgid "Medium vulnerabilities present" msgid "Medium vulnerabilities present"
...@@ -33858,6 +33858,15 @@ msgstr "" ...@@ -33858,6 +33858,15 @@ msgstr ""
msgid "Timeout connecting to the Google API. Please try again." msgid "Timeout connecting to the Google API. Please try again."
msgstr "" msgstr ""
msgid "Timeout for moderately fast Gitaly operations (in seconds). Provide a value between Default timeout and Fast timeout."
msgstr ""
msgid "Timeout for most Gitaly operations (in seconds)."
msgstr ""
msgid "Timeout for the fastest Gitaly operations (in seconds)."
msgstr ""
msgid "Timezone" msgid "Timezone"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment