Bug 51863 - Lots of ESTABLISHED connections with HttpClient 4 implementation (vs HttpClient 3.1 impl)
Lots of ESTABLISHED connections with HttpClient 4 implementation (vs HttpClie...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
Nightly (Please specify date)
PC Linux
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks: 51916
  Show dependency tree
 
Reported: 2011-09-21 22:35 UTC by Milamber
Modified: 2011-09-29 13:13 UTC (History)
0 users



Attachments
Simple Test Case (39.28 KB, application/octet-stream)
2011-09-21 22:36 UTC, Milamber
Details

Note You need to log in before you can comment on or make changes to this bug.
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