Ensure Workhorse log writers are closed to avoid Goroutine leaks
What does this MR do and why?
We've seen in production the number of Goroutines in Workhorse exceed 4000. The pprof output suggests that many of these came from the logrus Goroutines lingering.
When Workhorse forks gitlab-zip-cat
and gitlab-zip-metadata
it
attempts to log all stderr via a logrus Writer. logrus launches a
Goroutine to listen from a pipe. We should ensure this Writer is
closed so that the Goroutines shut down as soon as possible.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.