HTTP directives
keepalive_timeout directive (HTTP client)
In http, server or location. Default 75s. Controls how long an idle reusable client connection remains open. Zero disables client keep-alive. Not the similarly named upstream directive.
Formal Syntax & Structure
nginx syntaxnginx
keepalive_timeout timeout [header_timeout];Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| timeout | time | Idle timeout. |
| header_timeout | time | Optional advertised Keep-Alive timeout; may differ from actual timeout. |
Working Example
Example Snippetnginx
keepalive_timeout 5s;