Cases2 cases
1 to 2 of 2
IL-0312Gadget's main Postgres did not start again after a restart to raise max_connections, and the platform went downGadget2024- Symptoms
At 11:25 AM EST on 13 December 2024, Gadget restarted its main PostgreSQL server in place to raise max_connections. Postgres shut down but did not start again, and every request to Gadget applications failed, including frontend requests, GraphQL API requests, webhook processing and syncs.
- Trigger
An emergency in-place restart of the main Postgres server at 11:25 AM EST, decided at 11:00 AM, to raise max_connections, which Postgres cannot change without a full restart.
- Root cause
- Component
- Contributing factor
- Detection
The team carrying out the planned restart saw at 11:26 AM EST that Postgres had shut down and did not start again.
- Remediation
- Restarted the database server with a hardware reset, which cleared the fragmented memory so Postgres could start
- Provisioned almost 4x the compute after the autoscalers had scaled it down during the outage
- Action items
- Use only the replica-failover approach for disruptive database operations such as restarts
- Run a more aggressive capacity planning process before Black Friday / Cyber Monday, preparing for a 6x increase in load and proving it with load tests well in advance
- Announce planned downtime ahead of time on the status page and community Discord, and make the operating procedures tell planned maintenance apart from service disruptions
- Finish the database sharding project so apps can use different databases and configuration changes can go through canary and blue/green setups
- Finish building a zero-downtime database failover system
- Set much higher scaling floors on the compute autoscalers
- Lessons
Gadget names three deeper factors. Choosing the in-place restart put the database into a state the team had not seen before and was not confident in. Capacity planning for Black Friday / Cyber Monday assumed a doubling of traffic instead of the almost 5x that came, so settings such as max_connections stopped fitting and had to be changed in an emergency instead of in a maintenance window practised in staging. And there was no way to test database configuration changes in a production-like environment: integration tests run against a synthetic Postgres database that never goes through the months of production load behind the memory fragmentation or the memory usage issues.
IL-0302Peak load on GitHub's mysql1 MySQL cluster maxed out its database proxy's connections and stopped writes in March 2022GitHub2022- Symptoms
On March 16, 2022 at 14:09 UTC, write operations across GitHub stopped working, including git operations, webhooks, pull requests, API requests, issues, GitHub Packages, GitHub Codespaces, GitHub Actions and GitHub Pages. Under peak-hour load, the database proxy in front of the shared mysql1 MySQL database had reached its maximum number of connections.
- Trigger
Increased load on mysql1 during peak hours, combined with poor query performance in specific circumstances, pushed the database proxy to its maximum number of connections.
- Root cause
- Component
- Contributing factor
- Remediation
- Failed over mysql1 to a healthy replica on March 16
- Reset the application connections to the new primary on March 17
- Added an index that fixed the main query performance problem
- Performed a primary failover on March 22
- Performed a primary failover on March 23
- Throttled webhook traffic to reduce load
- Action items
- Keep throttling webhook traffic at peak load times
- Audit the load patterns of mysql1 during peak hours and make performance fixes based on the audits
- Move traffic to other databases to reduce load and speed up failover
- Review change management, particularly monitoring and changes during high load in production
- Shard the databases and scale up hardware
These 2 cases involve Database and Database proxy and connection pooler. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause1
Capacity exhaustion2 cases
- Contributing factor