diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | internal/rubyserver/worker.go | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e4a097d4..4ffb65999 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ UNRELEASED +- Wait between ruby worker removal from pool and graceful shutdown + https://gitlab.com/gitlab-org/gitaly/merge_requests/567 - Register the ServerService https://gitlab.com/gitlab-org/gitaly/merge_requests/572 - Vendor gitlab_git at f8dd398a21b19cb7d56 diff --git a/internal/rubyserver/worker.go b/internal/rubyserver/worker.go index 79f80334b..41de27a6d 100644 --- a/internal/rubyserver/worker.go +++ b/internal/rubyserver/worker.go @@ -137,6 +137,10 @@ func (w *worker) monitor() { } func (w *worker) waitTerminate(pid int) { + // Wait for in-flight requests to reach the worker before we slam the + // door in their face. + time.Sleep(1 * time.Minute) + terminationCounter.WithLabelValues(w.Name).Inc() log.WithFields(log.Fields{ |