read timeout not being reset on every write

32 views
Skip to first unread message

Daniel Bolanos

unread,
Oct 19, 2016, 1:07:44 PM10/19/16
to Dispatch

Hello, I see the method below to set the read timeout for the response, but not sure it is working the way it should. The timer seems to be started right after the http request is made, rather than once the body of the request is fully pushed to the server. For example, if I want the read timeout to be 60 second I do not want the timeout to happen while im still writing the request (long chunked request, minutes) to the server, I want the timeout to happen if I do not get any response for 60 seconds after writing the full request. Is this reasonable?

thank you!


setRequestTimeoutInMs

public AsyncHttpClientConfig.Builder setRequestTimeoutInMs(int defaultRequestTimeoutInMs)
Set the maximum time in millisecond an AsyncHttpClient wait for a response

Parameters:
defaultRequestTimeoutInMs - the maximum time in millisecond an AsyncHttpClient wait for a response
Returns:
AsyncHttpClientConfig.Builder

Aaron S. Hawley

unread,
Oct 19, 2016, 2:42:49 PM10/19/16
to dispatc...@googlegroups.com
On Wed, Oct 19, 2016 at 1:07 PM, Daniel Bolanos <dani.b...@gmail.com> wrote:

Hello, I see the method below to set the read timeout for the response, but not sure it is working the way it should. The timer seems to be started right after the http request is made, rather than once the body of the request is fully pushed to the server. For example, if I want the read timeout to be 60 second I do not want the timeout to happen while im still writing the request (long chunked request, minutes) to the server, I want the timeout to happen if I do not get any response for 60 seconds after writing the full request. Is this reasonable?

Daniel Bolanos

unread,
Oct 20, 2016, 3:06:24 PM10/20/16
to Dispatch
Thank you Aaron, we did not see that one

Dani

Daniel Bolanos

unread,
Oct 20, 2016, 3:08:21 PM10/20/16
to Dispatch
With "Idle" it means both not sending and not receiving any data, right?

thanks again

Dani

Aaron S. Hawley

unread,
Oct 20, 2016, 9:03:40 PM10/20/16
to dispatc...@googlegroups.com
That was my interpretation what idle meant as well, but I don't have any experience with timeouts.

Doesn't seem like read timeout is verified with tests


What the read timeout means for the underlying Netty client, is also unclear.  This 3 year old stack overflow post takes it up, though



--
You received this message because you are subscribed to the Google Groups "Dispatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dispatch-scala+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
In general, we reserve the right to have a poor
memory--the computer, however, is supposed to
remember!  Poor computer.  -- Guy Lewis Steele Jr.

Daniel Bolanos

unread,
Oct 24, 2016, 10:57:39 AM10/24/16
to Dispatch
thank you Aaron!

Dani


On Thursday, October 20, 2016 at 9:03:40 PM UTC-4, Aaron Hawley wrote:
That was my interpretation what idle meant as well, but I don't have any experience with timeouts.

Doesn't seem like read timeout is verified with tests


What the read timeout means for the underlying Netty client, is also unclear.  This 3 year old stack overflow post takes it up, though


On Thu, Oct 20, 2016 at 3:08 PM, Daniel Bolanos <dani.b...@gmail.com> wrote:
With "Idle" it means both not sending and not receiving any data, right?

thanks again

Dani

On Thursday, October 20, 2016 at 3:06:24 PM UTC-4, Daniel Bolanos wrote:
Thank you Aaron, we did not see that one

Dani

On Wednesday, October 19, 2016 at 2:42:49 PM UTC-4, Aaron Hawley wrote:
On Wed, Oct 19, 2016 at 1:07 PM, Daniel Bolanos <dani.b...@gmail.com> wrote:

Hello, I see the method below to set the read timeout for the response, but not sure it is working the way it should. The timer seems to be started right after the http request is made, rather than once the body of the request is fully pushed to the server. For example, if I want the read timeout to be 60 second I do not want the timeout to happen while im still writing the request (long chunked request, minutes) to the server, I want the timeout to happen if I do not get any response for 60 seconds after writing the full request. Is this reasonable?

Would a read timeout be sufficient?

--
You received this message because you are subscribed to the Google Groups "Dispatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dispatch-scal...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages