Squid forward_timeout, connect_timeout and read_timeout Compared
Choose the Squid timeout tied to finding an onward route, connecting to a peer, or waiting for more server data.
If Squid has already received part of a response and then waits for more data, increasing forward_timeout addresses the wrong wait. In Squid 5 through 7, choose among these clocks by the operation that stopped:
| What Squid is waiting for | Directive |
|---|---|
| A usable forwarding path | forward_timeout |
| A TCP connection to a server or peer, before trying another path | connect_timeout |
| More data from a peer-server connection; a successful read extends the wait | read_timeout |
Keep the error category and last successful operation beside the log entry. A failure before an onward connection exists points toward path selection or connection setup. A response that starts and then falls silent points toward the server-read stage. Include the selected peer and destination when tracing either case.
Before allowing a longer wait, establish that the target can recover within it. A timer cannot supply credentials or make an unavailable service reachable. Compare the client's deadline as well: otherwise the client may abandon the operation while Squid is still waiting.
These names and availability are release-specific. Use the deployed release's reference; an old dns_v4_first recommendation concerns address selection and does not tell you which of these waits failed.