Back to Linter
Infoperformance

Keepalive Timeout Too Low

Impact of very low keepalive_timeout settings on Nginx connection performance.

What This Rule Checks

This rule triggers when `keepalive_timeout` is set below 10 seconds.

Why It Matters

A very low keepalive timeout forces clients to establish new TCP connections frequently. Each new connection requires a TCP handshake (and TLS handshake for HTTPS), adding latency to every request.

Bad — Triggers this rule

keepalive_timeout 2;

Good — Passes this rule

keepalive_timeout 65;

How to Fix

Set `keepalive_timeout` to 60-75 seconds for most applications. Adjust in Configen's Performance section.

Related Rules

Check your config now

Paste your nginx.conf and get instant feedback on 20+ rules.

Open Linter →