Skip to content

gitaly/config: allow negotiation timeouts to be configured

James Liu requested to merge jliu-configurable-timeouts into master

Resolves #5574 (closed)

Adds a new [timeout] section to the TOML configuration file. This allows the user to override our default git-upload-pack and git-upload-archive negotiation timeouts of 10 minutes and 1 minute respectively. The example configuration file has been updated with the default values, as well as tests to ensure that defaults are applied if that section of the configuration is left empty.

Although these are reasonable upper limits for the negotiation phase, they seem to lead to failed requests if the user attempts to execute git archive --remote concurrently on a large repository, as described in this comment. It's possible that some internal locking or queuing is occurring when we attempt to spawn multiple git processes that perform the same action, so the first few requests succeed but subsequent requests fail due to having reached the negotiation timeout.

Edited by James Liu

Merge request reports