You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that if you did conn.setConnectTimeout(30000) and conn.setReadTimeout(30000), then it might be 60s before the request completes, provided the webserver deliberately waited 29.999s before allowing the connection to open... but this is not fixed by halving the initial read timeout, it just reduces it to 45s (15s over the configured timeout).
I'd say it was much more common that connection is established quickly, then the web server takes its time servicing the request, only starting its response after several seconds of work. I'd like to say conn.timeout(30000) to allow the webserver 30s of time to do something with my request before giving any response. I don't want it to have a timeout after 15s (after the connection was established in 0.001s)
The text was updated successfully, but these errors were encountered:
It took me several hours today to find out why the timeout was always 30 seconds, even though I had set it to 60 seconds.
No wonder, when the number is divided by 2.
This should be better explained in the documentation or fixed, please.
If I create a connection with a 30s timeout (e.g.
Jsoup.connect().timeout(30000)
), this allows:All three should allow up to 30s.
The 15s anomaly is due to
conn.setReadTimeout(req.timeout() / 2);
I understand that if you did
conn.setConnectTimeout(30000)
andconn.setReadTimeout(30000)
, then it might be 60s before the request completes, provided the webserver deliberately waited 29.999s before allowing the connection to open... but this is not fixed by halving the initial read timeout, it just reduces it to 45s (15s over the configured timeout).I'd say it was much more common that connection is established quickly, then the web server takes its time servicing the request, only starting its response after several seconds of work. I'd like to say
conn.timeout(30000)
to allow the webserver 30s of time to do something with my request before giving any response. I don't want it to have a timeout after 15s (after the connection was established in 0.001s)The text was updated successfully, but these errors were encountered: