DEV Community

Jason Y. (dev_in_the_fog)
Jason Y. (dev_in_the_fog)

Posted on

Nginx 504 Gateway Time-out, Kubernetes CrashLoopBackOff, and MySQL InnoDB Deadlocks: A Triage Cheatsheet

When on-call alerts fire at 2 AM, three infrastructure incidents account for a disproportionate share of wasted debugging time because the symptom hides the real bottleneck one layer below.

1. Nginx 504 Gateway Time-out

Nginx returns 504 when the upstream accepts the TCP connection but fails to send a response header before proxy_read_timeout (default 60s) expires.

2. Kubernetes CrashLoopBackOff (Exit Code 1 vs 137 OOMKilled)

CrashLoopBackOff is not the root error—it is Kubernetes backing off restarts after the container dies:

3. MySQL InnoDB Deadlocks (Next-Key & Gap Locks)

Under REPEATABLE READ, two concurrent INSERT ... ON DUPLICATE KEY UPDATE or range SELECT ... FOR UPDATE statements can acquire overlapping gap locks and deadlock even when touching different primary keys.

Offline Diagnostic Utilities (0 Bytes Uploaded)

When inspecting production configs, timestamps, CSS units, or query plans during an incident, keep sensitive dumps strictly in browser memory:

Top comments (0)