Bug 51863

Summary: Lots of ESTABLISHED connections with HttpClient 4 implementation (vs HttpClient 3.1 impl)
Product: JMeter - Now in Github Reporter: Milamber <milamber>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: Nightly (Please specify date)   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 51916    
Attachments: Simple Test Case

Description Milamber 2011-09-21 22:35:05 UTC
http://mail-archives.apache.org/mod_mbox/jakarta-dev/201108.mbox/%3CCAOGo0VaUMsYQT1pY-JbGeGPfDPbBiBsPzzN1_7W5b3T9=D=J8Q@mail.gmail.com%3E

Today, I try a load test on a Content Delivery Network (CDN) with HC3.1 vs HC4 with last JMeter trunk (r1173449).

(OpenJDK 6 or Sun JDK 7, GNU/Linux Debian 6.0 64 bits)

My script :
Test only static resources (gif, png, jpeg) with direct HTTP Request
100 users
Ramp up : 100 secs
Duration test : 300 secs (5min)
Each iteration execute 39 HTTP requests
HTTP requests : Keep Alive true


I have this issue (on 8 same tests: 4 HC3.1 and 4 HC4.1) :

With HC3.1 after ramp up period:
 netstat -tplna|grep java|grep ESTA|wc -l
100

With HC4.1 at beginning and after ramp up :
netstat -tplna| grep java | grep ESTA | wc -l
1145 (value change between ~1000-1150)

I make a tcp dump and analyze with wireshark.
With HC3.1 : 0-42 secs : 43 TCP conversations (inside several HTTP GET and response)
With HC4.1 : 0-44 secs : 3011 TCP conversations (inside one HTTP GET and one response)

HTTP conversations show Keep-Alive header (HC3 and HC4)

I suppose that is a close keep alive connection problem with JMeter.
Comment 1 Milamber 2011-09-21 22:36:58 UTC
Created attachment 27554 [details]
Simple Test Case

Here a simple test plan.
If you keep only 1 http request per iteration (with hc4) : 100 connections established with netstat (after ramp up)
If you keep 10 http requests per iteration (with hc4) : more 100 connections established (and more CLOSE_WAIT) before end of ramp up period
Comment 2 Sebb 2011-09-22 00:20:10 UTC
Thanks.

Patched:

URL: http://svn.apache.org/viewvc?rev=1173915&view=rev
Log:
Bug 51863 - Lots of ESTABLISHED connections with HttpClient 4 implementation (ws HttpClient 3.1 impl)

Modified:
   jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
   jakarta/jmeter/trunk/xdocs/changes.xml
Comment 3 The ASF infrastructure team 2022-09-24 20:37:47 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2554