[Tsung] Persistent connections?

Nicolas Niclausse nicolas at niclux.org
Wed May 14 10:25:33 CEST 2008


Aaron Pfeifer ecrivait le 12.05.2008 17:51:
> Hi,
> 
> One of the things I've noticed doing HTTP load tests with Tsung is that 
> the connection is kept open when performing thinktimes within a 
> session.  I had been using the default HTTP 1.1 connections.  This seems 
> to be a problem because if I have long thinktimes (e.g. 30 seconds), the 
> web server eventually empties its available connection pool.

Tsung does this because it's the default behavior of most browsers.

Apache close the connection after 15sec of inactivity (default value), so 
even if the thinktime is longer, the connection will be closed by the server.

> Recently, what I've been doing is enforcing HTTP 1.0 on requests so that 
> the connection isn't kept open.  I'm wondering (1) is this the right way 
> to do this and (2) is there another, more appropriate, way to do this?


If you need the 1.1 version, you can add a connection:close header.

<http_header name="Connection" value="close"/>

> I've tried setting the "persistent" option on the session, but I'm not 
> really sure what that does and it didn't seem to change anything.

No, the persistent option for session is used to abort the session as soon 
as the connection is closed. Not recommanded for http



-- 
Nicolas


More information about the Tsung-users mailing list