शब्दकोश · नेटवर्किंग

HTTP Keep-Alive Timeout

The HTTP keep-alive timeout is how long a server holds a persistent connection open waiting for the client's next request.

अपडेट: अक्टूबर 21, 2026

The HTTP keep-alive timeout is the time a server keeps an already-used HTTP/1.1 connection open while waiting for another request on it. If nothing arrives before the timer expires, the server closes the connection.

Why it matters

Reusing a connection avoids repeating the TCP and TLS handshakes, which saves latency for pages that load many assets. But every open connection consumes memory and a worker slot. Too short and clients reconnect constantly; too long and a busy server runs out of connections to idle clients. It also interacts with proxies: a backend timeout shorter than the proxy's causes occasional reset or 502 errors.

Example

Typical directives, with values you should tune for your own traffic:

nginx:
keepalive_timeout 15s;

Apache:
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 100

The server may also advertise its value to clients with a header such as Keep-Alive: timeout=5. Use the header checker to see what your server sends.

Common mistakes

  • Using a large value on Apache with prefork workers, where each idle connection holds a whole process.
  • Setting the origin timeout lower than the CDN or load balancer's idle timeout.
  • Confusing this with the request timeout, which limits how long one request may take.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.