Bug 60957

Summary: HttpClient4 don't reuse TCP connections
Product: JMeter - Now in Github Reporter: Maxime Bossard <maxbundy>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED DUPLICATE    
Severity: major CC: p.mouawad
Priority: P2    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

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
Comment 3 The ASF infrastructure team 2022-09-24 20:38:08 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4355