hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Default timeouts
Date Tue, 12 Jan 2016 22:36:22 GMT
On 1/12/2016 9:06 AM, Oleg Kalnichevski wrote:
> As of 4.4 HttpClient uses connect timeout value for SSL handshake by
> default. I hope this should be enough to address your biggest concern. 
>
> I am a bit hesitant to set socket and connect timeouts to a positive
> value by default as JRE default timeout values are 0 (no timeout).

An opinion from someone of no consequence on this project:

I think it would not be a big problem to have a nonzero default connect
timeout, perhaps something between two and five minutes.  It could
possibly go as low as one minute.

A nonzero default socket timeout is more of a *possible* problem.  The
majority of users would probably never notice, but it might be a very
surprising and problematic change for some users.

I'm not completely opposed to the idea, but my opinion about the default
socket timeout value is that it should be relatively large, not less
than five minutes, and perhaps 15 or 30.

These changes would only be appropriate in the next *major* version, and
it would need to be conspicuously documented, including the website,
RELEASE_NOTES.txt, and perhaps other places.  Even well-documented, it
will catch some users by surprise, but this is true of nearly *any* change.

The values I have mentioned are much larger than the values Gaspard
mentioned, but I believe it's better to have defaults that are longer
than might be typical.  Users who don't change the defaults will have a
safety net to prevent endless hangs, but the larger defaults will be
less likely to cause problems due to unexpected timeouts.

The safest option is to not change the defaults, but as already
mentioned on the thread, this can lead to situations where user programs
completely hang.

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message