Home / Companies / GitLab / Blog / Post Details
Content Deep Dive

How we reduced 502 errors by caring about PID 1 in Kubernetes

Blog post from GitLab

Post Details
Company
Date Published
Author
Steve Azzopardi
Word Count
2,334
Company Posts That Month
21
Language
English
Hacker News Points
-
Post removed?
No
Summary

The blog post discusses a technical issue encountered by GitLab's Site Reliability Engineering (SRE) team where GitLab Pages were consistently returning 502 errors, causing alert fatigue and impacting users. The problem was traced to GitLab Workhorse, a Go service that was not handling shutdown signals properly due to a misconfiguration in the Dockerfile CMD instruction, which used shell form instead of exec form. This oversight prevented GitLab Workhorse from terminating gracefully, leading Kubernetes to forcibly kill the process after 30 seconds, during which time 502 errors were generated. The team resolved the issue by updating the Dockerfile to ensure GitLab Workhorse received the termination signals correctly and implemented a progressive rollout with a feature flag to prevent disruption. The post highlights the importance of using the correct CMD syntax in Dockerfiles to manage processes effectively and prevent similar issues.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Kubernetes 7 1,629 193 76 +20%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.