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.
- Raising
proxy_read_timeoutalone only masks slow DB queries or missing upstream keepalive pools. - Check whether
upstream_response_timematches your timeout ceiling, and confirmproxy_connect_timeoutvsproxy_read_timeoutvs Kubernetes Ingress annotations (nginx.ingress.kubernetes.io/proxy-read-timeout). - Full tuning walkthrough: Nginx 504 Gateway Timeout & proxy_read_timeout Tuning and Ingress Nginx 504 Upstream Postmortem.
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:
- Run
kubectl describe pod <pod>and check Last State -> Reason / Exit Code:-
Exit Code
137(OOMKilled): container exceeded cgroup v2limits.memory, often from JVM/Node heap unaware of container limits. -
Exit Code
1: missing env var, failed migration, or unreachable dependency.
-
Exit Code
- Deep-dive guides: Debugging Kubernetes CrashLoopBackOff Exit Code 1 and Kubernetes OOMKilled & cgroup v2 Profiling.
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.
- Always run
SHOW ENGINE INNODB STATUSimmediately and compare lock modes (X,GAPvsX,REC_NOT_GAP) and index order. - Full postmortem & lock graph analysis: MySQL Deadlock Postmortem: Gap & Next-Key Lock Patterns.
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)