-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRESOLVER-612] Align timeout interpretations across HTTP transports #587
Conversation
The `ConfigurationProperties#REQUEST_TIMEOUT` was wrongly interpreted by JDK and Jetty clients as "absolute max duration of HTTP request". Also, up default CONNECT_TIMEOUT from 10sec to 30sec.
@@ -288,16 +288,20 @@ final class ApacheTransporter extends AbstractTransporter implements HttpTranspo | |||
.register(AuthSchemes.KERBEROS, new KerberosSchemeFactory()) | |||
.build(); | |||
SocketConfig socketConfig = | |||
SocketConfig.custom().setSoTimeout(requestTimeout).build(); | |||
// the time to establish connection (low level) | |||
SocketConfig.custom().setSoTimeout(connectTimeout).build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SO timeout is the read timeout on the socket, so the maximum amount of time between two packets (or, on the server side, the max time for accept()
). So I don't think it should be set to connectTimeout
.
How does this timeout work wrt to the socket timeout below ? Is the timeout on the SocketConfig
used when no value is set on RequestConfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SoTimeout is set on socket directly (so it works as Javadoc and you explain). The "socket timeout" is specific to HttpClient and would like to get some clarification about it @michael-o
The
ConfigurationProperties#REQUEST_TIMEOUT
was wrongly interpreted by JDK and Jetty clients as "absolute max duration of HTTP request".Also, up default CONNECT_TIMEOUT from 10sec to 30sec.
Changes per transport:
https://issues.apache.org/jira/browse/MRESOLVER-612
https://issues.apache.org/jira/browse/MRESOLVER-615