You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Vladimir Sitnikov <si...@gmail.com> on 2019/12/12 10:21:22 UTC

httpclient4.time_to_live defaults to 2000 which is way less than the typical browser behavior

Hi,

JMeter defaults to 2 seconds timeout for keep-alive HTTP connections, which
seems to be much less than the typical browser configuration.

https://en.wikipedia.org/wiki/HTTP_persistent_connection#Use_in_web_browsers
,
https://fastmail.blog/2011/06/28/http-keep-alive-connection-timeouts/
suggest that:
IE: 60 sec
FireFox: 115 sec
Chrome: 300 sec

What do you think if we bump the default for httpclient4.time_to_live from
2000 to 120000 (==2 min)?

I guess the current setting of 2000 was just a copy-paste result when the
setting was initially implemented.
Here's the commit that introduces the feature:
https://github.com/apache/jmeter/commit/eaaf1be40908ba5f74e7baac9ea985cc62de6a6f#diff-4e3471b25c91730a99ed23402467b9eaR146

Vladimir

Re: httpclient4.time_to_live defaults to 2000 which is way less than the typical browser behavior

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
Ok by me for 60 or 115s
This should be marked as incompatible changes in release notes.

Regards

On Thu, Dec 26, 2019 at 12:14 PM Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

>
> Am 25.12.19 um 12:42 schrieb Vladimir Sitnikov:
> >> more connections on the
> > client, which can be a sparse resource.
> >
> > It does not typically exceed the number of threads, so users would expect
> > that.
> >
> > The problem with the current default is it makes the false sense of
> > enabling keep-alive in UI.
> >
> > The users might think that they activate KA, but it is not used if the
> > response times exceed 2sec.
> >
> > Reusing connections after 60seconds might even enable to surface
> > concurrency issues in the app.
>
> What do the others think? I am fine with a change to something higher
> (60s would be OK I guess).
>
> Felix
>
> >
> > Vladimir
> >
>


-- 
Cordialement.
Philippe Mouawad.

Re: httpclient4.time_to_live defaults to 2000 which is way less than the typical browser behavior

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 25.12.19 um 12:42 schrieb Vladimir Sitnikov:
>> more connections on the
> client, which can be a sparse resource.
>
> It does not typically exceed the number of threads, so users would expect
> that.
>
> The problem with the current default is it makes the false sense of
> enabling keep-alive in UI.
>
> The users might think that they activate KA, but it is not used if the
> response times exceed 2sec.
>
> Reusing connections after 60seconds might even enable to surface
> concurrency issues in the app.

What do the others think? I am fine with a change to something higher
(60s would be OK I guess).

Felix

>
> Vladimir
>

Re: httpclient4.time_to_live defaults to 2000 which is way less than the typical browser behavior

Posted by Vladimir Sitnikov <si...@gmail.com>.
>more connections on the
client, which can be a sparse resource.

It does not typically exceed the number of threads, so users would expect
that.

The problem with the current default is it makes the false sense of
enabling keep-alive in UI.

The users might think that they activate KA, but it is not used if the
response times exceed 2sec.

Reusing connections after 60seconds might even enable to surface
concurrency issues in the app.

Vladimir

Re: httpclient4.time_to_live defaults to 2000 which is way less than the typical browser behavior

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 12.12.19 um 11:21 schrieb Vladimir Sitnikov:
> Hi,
>
> JMeter defaults to 2 seconds timeout for keep-alive HTTP connections, which
> seems to be much less than the typical browser configuration.
>
> https://en.wikipedia.org/wiki/HTTP_persistent_connection#Use_in_web_browsers
> ,
> https://fastmail.blog/2011/06/28/http-keep-alive-connection-timeouts/
> suggest that:
> IE: 60 sec
> FireFox: 115 sec
> Chrome: 300 sec
>
> What do you think if we bump the default for httpclient4.time_to_live from
> 2000 to 120000 (==2 min)?
>
> I guess the current setting of 2000 was just a copy-paste result when the
> setting was initially implemented.
> Here's the commit that introduces the feature:
> https://github.com/apache/jmeter/commit/eaaf1be40908ba5f74e7baac9ea985cc62de6a6f#diff-4e3471b25c91730a99ed23402467b9eaR146

When we use a higher default, we are using more connections on the
client, which can be a sparse resource. So I think two minutes is
relatively high.

Two seconds might be a bit low, but I personally don't use keepalives
longer that five to ten seconds on our servers.

Felix

>
> Vladimir
>