5xx errors grow slowly over several days and vanish after every deploy or restart.

IntermediateTroubleshooting5xx errors
Answer

Likely causes → A resource leak: memory, file descriptors, threads, or connections. Restarts mask it. The memory graph looks like a sawtooth that resets at each deploy.

Diagnose → Graph memory, open FDs, goroutines/threads and DB connections per pod over a week. Take heap snapshots a few hours apart and diff them (pprof, jmap, Node --heapsnapshot-signal).

Fix → Find and fix the leak. As a stopgap, a scheduled rolling restart is acceptable, but log it as tech debt.

Prevent → Long-running soak tests in staging and alerts on growth rate, not only absolute thresholds.

All Real-World Interview questions Roadmap: Interview readiness

More on 5xx errors