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 07:59:35 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2022-04-13 07:59:35 +0300
commit962ecac625643dc4956fec2113d04e6c538e1c46 (patch)
tree3c7629f006a63ae83bfc44a8184d006affb2a209
parent4fe3a81b187af031a8c5283009eb82be7410ec2e (diff)
parent34ca1a3c379d98a8e52e52b9ddfc81abb6cbda7e (diff)
Merge branch 'kassio/fix-large-file-download-timeouts-1-56' into '1-56-stable'
Increase serverWriteTimeout to avoid errors with large files See merge request gitlab-org/gitlab-pages!725
-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 a1fca236..c28e2856 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -337,6 +337,10 @@ func LogConfig(config *Config) {
"rate-limit-tls-source-ip-burst": config.RateLimit.TLSSourceIPBurst,
"rate-limit-tls-domain": config.RateLimit.TLSDomainLimitPerSecond,
"rate-limit-tls-domain-burst": config.RateLimit.TLSDomainBurst,
+ "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 25a526f6..1624f8f6 100644
--- a/internal/config/flags.go
+++ b/internal/config/flags.go
@@ -84,7 +84,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")