Nginx high cpu usage
Nginx high cpu usage is typically caused by a compute-bound bottleneck where one or more processes are saturating CPU cores. Here is what to look for and what to do about it.
Common symptoms
- nginx worker processes using high CPU
- request latency increasing under load
- CPU spikes during traffic bursts
Likely causes
- Evidence suggests: nginx worker PIDs dominate CPU list
- Evidence suggests: connection count exceeds worker_connections
Evidence to look for
nginx worker PIDs dominate CPU list
connection count exceeds worker_connections
SSL handshakes consuming cycles
What it usually means
When CPU is the true bottleneck, the fix is usually profiling the hot path and reducing compute work. Scaling horizontally or vertically without profiling first is wasteful.
What to do next
- 1increase worker_processes to match CPU cores
- 2enable SSL session caching to reduce handshake overhead
- 3check for misconfigured regex in location blocks
See what's causing your CPU
cpum.ai turns CPU, process, disk, and memory signals into plain-English explanations with evidence.
Open cpum.ai