What's the difference between 'connect_timeout' and 'timeout' request options in Guzzle.
request timeout — a time period required to process an HTTP call: from sending a request to receiving a response. connection timeout — a time period in which a client should establish a connection with a server.
If you have a queued job that uses Guzzle to make a request, make sure you set a timeout value for the guzzle request: (new \GuzzleHttp\Client())->get('http://domain.com', [ 'timeout' => 15 ]);
The most basic way I can explain this is (from what I understand):
Also this answer relating to curl's timeouts is quite nice - https://unix.stackexchange.com/questions/94604/does-curl-have-a-timeout/94612
The flags that get used to define the timeouts, --connect-timeout and --max-time, make the difference a lot clearer.
I also believe the Guzzle options are linked to these curl options
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With