-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
First of all, thanks for such a great project!
In a project, I'm using AHC 1.9.15. I hope that we will be able to upgrade soon, but we are experiencing an issue which cannot wait for the upgrade.
The issue is about a POST request which is expected to take quite some time. On that request's level, we set a request timeout which is one hour. The AsyncHttpClient instance has read timeout and request timeout set to 1 minute.
The mention POST request is failing, because of the read timeout. AHC's source code for NettyRequestSender shows this:
int readTimeoutValue = config.getReadTimeout();
if (readTimeoutValue != -1 && readTimeoutValue < requestTimeoutInMs) {
// no need for a readTimeout that's less than the requestTimeout
Timeout readTimeout = newTimeout(new ReadTimeoutTimerTask(nettyResponseFuture, this, timeoutsHolder,
requestTimeoutInMs, readTimeoutValue), readTimeoutValue);
timeoutsHolder.readTimeout = readTimeout;
}Based on the above, I have following questions:
- What exactly is the difference between read and request timeout?
- Is there a possibility to set the read timeout on request level?
- Based on the comment "no need for a readTimeout that's less than the requestTimeout" shouldn't the condition be
readTimeoutValue > requestTimeoutInMs? I might be way off here because I don't really understand the difference between read and request timeout here.
Thanks in advance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels