jakarta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Lots of CLOSE_WAIT with HC4 HTTP implementation
Date Wed, 24 Aug 2011 11:40:11 GMT
On 24 August 2011 02:43, sebb <sebbaz@gmail.com> wrote:
> Looks like HTTPHC4Impl is not reusing HttpClient instances.
>
> It should only create one per thread per unique URL + some other fields.
>
> It seems not to be finding the previously created instances, so it
> creates a new one for every sample.
> Not sure why yet; probably something simple.

Very simple.

The equals() method was returning false if the other object was the
correct type, instead of returning false for the incorrect type.
So the hash keys never matched.

Nightly builds from r1160957 will have the fix.

> However the code does at least seem to be closing the connections at
> end of thread.
>
> On 23 August 2011 17:13, Milamber <milamber@apache.org> wrote:
>>
>> [snip]
>>>> I believe is a HTTPClient issue, on close connection?
>>>> (http://www.sunmanagers.org/pipermail/summaries/2006-January/007068.html)
>>>>
>>> I think it's more likely to be that JMeter is not tidying up the HC4
>>> connections properly.
>>>
>>> Are you using Keep-Alive?
>>>
>>
>> Yes.
>>
>>> Can you reproduce the problem with a simpler test case, e.g. one that
>>> could be run against a local server.
>>>
>>
>> Yes on my laptop (Debian 6 / 64 bits / openjdk 1.6u18)
>>
>> in attachment JMeter testcase.
>>
>> With HC4 impl:
>> summary =  2590 in  72.4s =   35.8/s Avg:   994 Min:   487 Max:  4806
>> Err:     0 (0.00%)
>>
>> Stats at ~ 72secs :
>> netstat -tuplna|grep java |wc -l;
>> 1494
>> netstat -tuplna|grep java|grep ESTA|wc -l;
>> 167
>> netstat -tplnau|grep java|grep CLOSE_WAIT|wc -l;
>> 1337
>>
>>
>> With HC3 impl:
>> summary =  4498 in  83.2s =   54.1/s Avg:   448 Min:   246 Max:  2489
>> Err:     0 (0.00%)
>>
>> Stats at ~83 secs:
>> netstat -tuplna|grep java |wc -l;
>> 61
>> netstat -tuplna|grep java|grep ESTA|wc -l;
>> 60
>> netstat -tplnau|grep java|grep CLOSE_WAIT|wc -l;
>> 0
>>
>> NB: more requests in same time with HC3.
>> NB2: HC3 ESTABLISHED connections is lesser than HC4 (60 users in JMeter
>> scripts)
>>
>>
>> Milamber
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: dev-help@jakarta.apache.org


Mime
View raw message