open_timeout is the amount of time you are ready to wait for the โconnection to openโ. In the context of TCP, the amount of time that you waited for the handshake to complete before you discard the attempt and throw a timeout error.
read_timeout , as you might have guessed, is the time when you are ready to wait for some data from the connected side. An example can make this clear:
In SOAP over HTTP through a TCP context (simplified):
You are trying to establish a TCP connection to the server. If establishing a connection takes longer than open_timeout, you remove the connection attempt and increase / increase the time / signal / timeout.
If the connection is successful, you send an HTTP request. (This may also fail and may have a timeout)
Then you wait for a response from the server. If the response takes longer than read_timeout, you throw away the connection and raise / signal / return error.
user507577
source share