GunicornNGINX

Nginx gzip compression with large responses may exhaust buffers causing CPU spike

warning
performanceUpdated Mar 24, 2026
How to detect:

When nginx gzip compression is enabled with large client_max_body_size (20M), compressing large responses may exhaust buffers and cache, potentially causing CPU spikes in upstream Gunicorn workers.

Recommended action:

Test by disabling gzip compression in nginx config temporarily to see if CPU spikes resolve. If confirmed, tune gzip buffer settings or reduce gzip_min_length, or selectively disable gzip for large responses. Review actual response sizes being served on affected pages.