Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2022-04-13 08:01:18 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2022-04-13 08:01:18 +0300
commit86683c5783a8536395eb04ad717d463586dc2565 (patch)
tree89c26ba137129194fbf54f89bfe4289db825c2c5
parentd9f0b9914a1bd9464241042afac6a8d157d97aa8 (diff)
parent61dd377fa1b63d3498a7cc9e1c09959a4ca52090 (diff)
Merge branch 'kassio/fix-large-file-download-timeouts-1-54' into '1-54-stable'
Increase serverWriteTimeout to avoid errors with large files See merge request gitlab-org/gitlab-pages!724
-rw-r--r--internal/config/config.go4
-rw-r--r--internal/config/flags.go2
2 files changed, 5 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 2e2c99f4..ca55af1d 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -315,6 +315,10 @@ func LogConfig(config *Config) {
"zip-cache-cleanup": config.Zip.CleanupInterval,
"zip-cache-refresh": config.Zip.RefreshInterval,
"zip-open-timeout": config.Zip.OpenTimeout,
+ "server-read-timeout": config.Server.ReadTimeout,
+ "server-read-header-timeout": config.Server.ReadHeaderTimeout,
+ "server-write-timeout": config.Server.WriteTimeout,
+ "server-keep-alive": config.Server.ListenKeepAlive,
}).Debug("Start Pages with configuration")
}
diff --git a/internal/config/flags.go b/internal/config/flags.go
index d78c043e..61fd13b8 100644
--- a/internal/config/flags.go
+++ b/internal/config/flags.go
@@ -65,7 +65,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", 30*time.Second, "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", 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.")
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")