Field notes · 6 min read

Event-loop lag symptoms that look like database faults

Analytics charts on a monitor

Your APM shows database query duration climbing. DBAs insist indexes are fine. Meanwhile p99 latency on unrelated read-only endpoints climbs in sync. That pattern often means the event loop is starved, and every I/O callback waits longer in queue.

Symptoms that overlap with DB slowness

Quick checks in production

Expose eventLoopUtilization() or use your APM's Node runtime tab if available. Compare lag against deploy timestamps and cron schedules—month-end report generation running inside the API process is a frequent culprit.

Isolate CPU work

Move PDF generation, large JSON serialisation, and synchronous bcrypt rounds off the request thread. Worker threads or a dedicated job consumer are boring solutions that actually stick.

Need a second opinion while production is noisy? Describe your graphs and we will suggest the next measurement before you scale database hardware.