You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Andrej van der Zee <an...@gmail.com> on 2011/07/27 09:36:33 UTC

iterations and re-connects

Hi,

Is it possible in JMeter to keep a connection open when it goes into
the next iteration? It seems that it breaks off the connection and
re-connects on every iteration.

Cheers,
Andrej

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


Re: iterations and re-connects

Posted by Felix Frank <ff...@mpexnet.de>.
On 07/27/2011 10:37 AM, sebb wrote:
>> Hi,
>> >
>> > Is it possible in JMeter to keep a connection open when it goes into
>> > the next iteration? It seems that it breaks off the connection and
>> > re-connects on every iteration.
> That should not happen if you are using the HttpClient sampler and you
> select KeepAlive.
> 

... except the server is generating Connection: close headers, or using
HTTP 1.0 etc.

This can be the case for any number of reasons. If in doubt, scrutinize
the response headers.

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


Re: iterations and re-connects

Posted by sebb <se...@gmail.com>.
On 27 July 2011 08:36, Andrej van der Zee <an...@gmail.com> wrote:
> Hi,
>
> Is it possible in JMeter to keep a connection open when it goes into
> the next iteration? It seems that it breaks off the connection and
> re-connects on every iteration.

That should not happen if you are using the HttpClient sampler and you
select KeepAlive.

> Cheers,
> Andrej
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

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


Re: iterations and re-connects

Posted by Andrej van der Zee <an...@gmail.com>.
>
> This is not surprising. Proper Layer-7 Loadbalancing often requires a
> new connection per request.

There were using sticky sessions, so proper application-level
load-balancing was already abandoned. The sysads mentioned that the
load-balancer did not keepalive connection because of "technical
reasons". Still wonder what they are.

Cheers,
Andrej

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


Re: iterations and re-connects

Posted by Felix Frank <ff...@mpexnet.de>.
On 07/28/2011 10:16 AM, Andrej van der Zee wrote:
> In the meantime it turned out that the loadbalancer did not keepalive connections to the backend servers. I was looking at the tcpdumps of one backend server and found that a new connection was established for each request.
> 

This is not surprising. Proper Layer-7 Loadbalancing often requires a
new connection per request.
On the other hand, it may just be a backend server misconfiguration
(KeepAlive off in Apache or similar). Your admins can probably tell you
more.

Cheers,
Felix

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


Re: iterations and re-connects

Posted by Valentine Petrovsky <va...@gmail.com>.
On 28/07/2011 в 17:16 +0900, Andrej van der Zee wrote:
> > 
> > Do you use a secure HTTP (HTTPS) in your tests?
> > 
> 
> Both, is there something special about https?
> 
It depends on your web-server configuration and what kind of browser you
use. If you use Apache and MSIE to record HTTP-traffic, try search for
these options in Apache *.conf files:

SetEnvIf User-Agent ".*MSIE.*" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0

It forces Apache to close a connection after every HTTPS-request for
MSIE browser: http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html#msie

In any case, if much reconnects occur under heavy load, you see a huge
amount of TCP-connections in the TIME_WAIT status. Try on JMeter
machine:

Win: netstat -nap tcp | findstr "<web-server IP>"
*nix: netstat -na | grep "<web-server IP>"

Regards,
Valentine



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


Re: iterations and re-connects

Posted by Andrej van der Zee <an...@gmail.com>.
Hi,

>> 
>> 
> 
> Do you use a secure HTTP (HTTPS) in your tests?
> 

Both, is there something special about https?

In the meantime it turned out that the loadbalancer did not keepalive connections to the backend servers. I was looking at the tcpdumps of one backend server and found that a new connection was established for each request.

Mvg,
Andrej
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: iterations and re-connects

Posted by Valentine Petrovsky <va...@gmail.com>.
On 27/07/2011 09:36 +0200, Andrej van der Zee wrote:
> Hi,
> 
> Is it possible in JMeter to keep a connection open when it goes into
> the next iteration? It seems that it breaks off the connection and
> re-connects on every iteration.
> 
> Cheers,
> Andrej 

Hi, Andrej,

Do you use a secure HTTP (HTTPS) in your tests?

Regards,
Valentine



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