Skip to main content

Global Timeouts

Global Timeouts set the global server timeouts for HTTP request and response streams.

You can set also set route-level timeouts.

Read Timeout

Read Timeout sets the maximum amount of time for a downstream client to complete a single HTTP request. The time starts when a request is begun and ends either when Pomerium has proxied the entire request body to the upstream service, or when Pomerium has begun sending a response back to the client.

This timeout is disabled if set to 0. (This is not recommended, as a malicious client could consume significant resources by beginning many incomplete requests.)

How to configure

Config file keysEnvironment variablesTypeDefault
timeout_readTIMEOUT_READGo Duration string30s

Examples

timeout_read: 30s
TIMEOUT_READ=30s

Write Timeout

Write Timeout sets the maximum time for a single HTTP request/response pair to fully complete. This should be greater than the Read Timeout setting as this includes both the request and response time.

This timeout is disabled if set to 0.

How to configure

Config file keysEnvironment variablesTypeDefault
timeout_writeTIMEOUT_WRITEGo Duration string0 (no timeout)

Examples

timeout_write: 0
TIMEOUT_WRITE=0

Idle Timeout

Idle Timeout sets the time at which an upstream or downstream connection will be terminated if there are no active requests/responses.

This timeout is disabled if set to 0.

How to configure

Config file keysEnvironment variablesTypeDefault
timeout_idleTIMEOUT_IDLEGo Duration string5m

Examples

timeout_idle: 5m
TIMEOUT_IDLE=5m