diff options
author | Kassio Borges <kborges@gitlab.com> | 2022-04-22 11:25:55 +0300 |
---|---|---|
committer | Kassio Borges <kborges@gitlab.com> | 2022-04-22 11:25:55 +0300 |
commit | 790b92165f6e29cc7bada7862cdf3f1928170b23 (patch) | |
tree | 003fd1110cce44aefabf138a49c11df6d44b2703 /internal/config | |
parent | fc7766e6ba24ac34225234e3ce7cd1eb8edbaab2 (diff) |
config: Default serverWriteTimeout to 0kassio/default-server-write-timeout-to-0
To avoid timeouts on large file downloads, change the default
`serverWriteTimeout` to `0` (no timeout).
Related to:
https://gitlab.com/gitlab-org/gitlab-pages/-/issues/725#note_915081271
Changelog: changed
Diffstat (limited to 'internal/config')
-rw-r--r-- | internal/config/flags.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/config/flags.go b/internal/config/flags.go index c2d315d1..75d01957 100644 --- a/internal/config/flags.go +++ b/internal/config/flags.go @@ -85,7 +85,7 @@ var ( // HTTP server timeouts serverReadTimeout = flag.Duration("server-read-timeout", 5*time.Second, "ReadTimeout is the maximum duration for reading the entire request, including the body. A zero or negative value means there will be no timeout.") serverReadHeaderTimeout = flag.Duration("server-read-header-timeout", time.Second, "ReadHeaderTimeout is the amount of time allowed to read request headers. A zero or negative value means there will be no timeout.") - serverWriteTimeout = flag.Duration("server-write-timeout", 5*time.Minute, "WriteTimeout is the maximum duration before timing out writes of the response. A zero or negative value means there will be no timeout.") + serverWriteTimeout = flag.Duration("server-write-timeout", 0, "WriteTimeout is the maximum duration before timing out writes of the response. A zero or negative value means there will be no timeout.") serverKeepAlive = flag.Duration("server-keep-alive", 15*time.Second, "KeepAlive specifies the keep-alive period for network connections accepted by this listener. If zero, keep-alives are enabled if supported by the protocol and operating system. If negative, keep-alives are disabled.") disableCrossOriginRequests = flag.Bool("disable-cross-origin-requests", false, "Disable cross-origin requests") |