Bug 60957 - HttpClient4 don't reuse TCP connections
Summary: HttpClient4 don't reuse TCP connections
Status: RESOLVED DUPLICATE of bug 60690
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 3.1
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-06 10:12 UTC by Maxime Bossard
Modified: 2017-04-06 11:44 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Bossard 2017-04-06 10:12:59 UTC
The current implementation of HttpClient4 don't reuse HTTP connections, dispite the "Use Keepalive" checked, the headers are present in the request and in the response.
TCP connections are not closed ether, they quickly move to state TIME-WAIT.

With the same test plan, HttpClient3.1 correctly reuse TCP connections.
Comment 1 Philippe Mouawad 2017-04-06 11:12:39 UTC
Hello,
Can you test JMeter nightly build ?
http://jmeter.apache.org/nightly.html

This is not a bug but a configuration you have to do on these properties:
httpclient4.idletimeout=0
httpclient4.validate_after_inactivity=1700
httpclient4.time_to_live=2000

Read :
http://jmeter.apache.org/usermanual/properties_reference.html


Default values have been improved in 3.2

*** This bug has been marked as a duplicate of bug 60690 ***
Comment 2 Maxime Bossard 2017-04-06 11:44:54 UTC
(In reply to Philippe Mouawad from comment #1)
> Hello,
> Can you test JMeter nightly build ?
> http://jmeter.apache.org/nightly.html
> 
> This is not a bug but a configuration you have to do on these properties:
> httpclient4.idletimeout=0
> httpclient4.validate_after_inactivity=1700
> httpclient4.time_to_live=2000
> 
> Read :
> http://jmeter.apache.org/usermanual/properties_reference.html
> 
> 
> Default values have been improved in 3.2
> 
> *** This bug has been marked as a duplicate of bug 60690 ***

Yup, it works with httpclient4.time_to_live greater than the value returned by the server.

I didn't test the nightly build, but I can't see a difference for this property in the 3.2RC2 version of jmeter.properties
cf: https://github.com/apache/jmeter/blob/v3_2_RC2/bin/jmeter.properties