CRE-2025-0056
NGINX worker connections limit exceededMediumImpact: 8/10Mitigation: 3/10
CRE-2025-0056View on GitHub
Description
NGINX has reported that the configured worker_connections limit has been reached. This indicates that the web server
has exhausted the available connection slots for handling concurrent client requests. When this limit is reached,
new connection attempts may be rejected until existing connections are closed, causing service degradation or outages.
Cause
- Insufficient worker_connections setting for the traffic volume
- Unexpected traffic spike or DDoS attack
- Slow upstream servers causing connections to remain open longer than expected
- Keep-alive connections accumulating and not being closed properly
- Memory constraints preventing optimal worker_connections settings
Mitigation
- Increase the worker_connections directive in the events block of your nginx.conf file:
events {
worker_connections 8192; # Increase from default 1024
}
- Ensure worker_processes is set optimally (usually equal to number of CPU cores)
- Consider enabling multi_accept for high-traffic situations
- Tune keepalive_timeout to release connections faster if appropriate
- Monitor connection usage with "nginx -V" and adjust based on system resources
- For persistent high traffic, consider horizontal scaling with load balancing
- Implement rate limiting for abusive clients