internal/worker: increase server restart frequency
Some gvisor leaks are still present.
Change-Id: I705c57422cb87ee40c9f2a68c378e0999f63817b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/619055
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/internal/worker/server.go b/internal/worker/server.go
index 8d203af..09eb865 100644
--- a/internal/worker/server.go
+++ b/internal/worker/server.go
@@ -223,7 +223,7 @@
// incoming request that triggers the reset will be disregarded. Cloud Run will retry
// that request.
func reqMonitorHandler(s *Server, h func(http.ResponseWriter, *http.Request) error) func(http.ResponseWriter, *http.Request) error {
- const reqLimit = 500 // experimentally shown to be a good threshold
+ const reqLimit = 250 // experimentally shown to be a good threshold
return func(w http.ResponseWriter, r *http.Request) error {
// Reset the server after a certain number of requests due to a process leak.
// TODO(#65215): why does this happen? It seems to be due to gvisor.