Incident Library

IL-0302 GitHub · 2022-03-16database

Peak load on GitHub's mysql1 MySQL cluster maxed out its database proxy's connections and stopped writes in March 2022

GitHub's mysql1 MySQL cluster is shared by multiple services and has a single primary for writes and replicas for reads. On March 16, 2022, peak-hour load and poorly performing queries pushed the database proxy in front of it to its maximum number of connections, and all write operations on GitHub failed for 5 hours and 36 minutes, until the team failed over to a healthy replica. GitHub then started investigating traffic patterns and query performance at peak load.

On March 17 the same peak load came back before the query problems were found. The team failed over in advance, but the failover caused a new load pattern and connectivity problems on the new primary, and applications could not connect to mysql1 while the team reset the connections. During this incident the team identified the load pattern and then added an index that fixed the main performance problem. On March 22, while memory profiling was enabled on the database proxy to study peak load, client connections to mysql1 started to fail and another primary failover was needed. On March 23 the same load characteristics returned; the team failed over again and throttled webhook traffic to reduce load. GitHub described the common theme as resource contention in mysql1 during peak load, in a main database it has been partitioning and adding clusters around for several years.

Severity
–
Scope
Write operations on GitHub, including git operations, webhooks, pull requests, API requests, issues, GitHub Packages, GitHub Codespaces, GitHub Actions and GitHub Pages, on March 16, 17, 22 and 23, 2022
Users affected
–
Region
–
Time to detect
–
Time to resolve
5h 36m

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.

mysql1 is shared by multiple services and carries heavy read and write traffic. The cluster has a single primary that takes writes and replicas that serve reads. The incident appeared to be related to peak load combined with poor query performance in specific sets of circumstances.

The same pattern returned on four days. The March 16 incident lasted 5 hours and 36 minutes. On March 17 at 13:46 UTC, under the same peak load, the team failed over before the problem grew, but the failover caused a new load pattern and applications could not connect to the new primary, for 2 hours and 28 minutes. On March 22 at 15:53 UTC, client connections to mysql1 started to fail at the same time as memory profiling was enabled on the database proxy, for 2 hours and 53 minutes. On March 23 at 14:49 UTC, client connections failed again, for 2 hours and 51 minutes.

Symptom Writes rejectedDatabase overloadHigh error rateFailover failure

Root cause

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.

Detection

–

Remediation

Action items

Lessons

–

Sources

Related cases

Check your cluster for this

kubegap audits a Kubernetes cluster for conditions like the ones in this case, Database, Database proxy and connection pooler among them, read-only, from Claude Code or Codex. Its checks cite public reports like this one.

For AI tools and scripts

The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.