jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: thread group thread behavior
Date Fri, 05 Dec 2008 12:58:10 GMT
On 05/12/2008, kirk <kirk.pepperdine@gmail.com> wrote:
> Hi sebb,
>
>  These are actualy jsessionid's. For the test I used 2 samplers in the
> thread with only 3 threads. I was looking for the information in the tree
> listener and it correlated with what the server was saying.
>

I don't know for certain how jsession ids are passed from client to
server. Assuming that this is done via cookies, then JMeter will only
send the cookie if there is a Cookie Manager and the cookie matches
the domain. Cookies are stored by the Cookie Manager for the local
thread only, so each thread can have the same cookie name with
different values.

If "Clear Cookies each iteration" is selected, then cookies will be
cleared at the start of each iteration of the parent container -
usually the Thread Group.

The cookie is intially stored on receipt of a Set-Cookie: header.

The server is free to provide whatever cookies it wishes. It may
generate a new cookie each time it sees a request without a cookie
(e.g. that is what Google seems to do), or it may require a login.

>  What I was really hoping for was a new session id for each thread at the
> restart of the loop. That didn't seem to happen even though the clear
> cookies flag was set.

In that case, either there is a JMeter bug (AFAIK, 2.3.2 Cookie
Manager is working OK), or the server must be resending the same
cookie to JMeter.

>  When looking for why that was happening I noted that
> only one thread was being worked which made my test even worse.

I assume you are referring to a server thread.

> Not having a
> cookie manager cases the server to react as expected in that there is a new
> jsession assigned to each sampler request. I'm using the latest release.

Do you mean 2.3.2?

>  I'll turn on debug to see if I can figure out whats happening.
>
>  Regards,
>  Kirk
>
>
>  sebb wrote:
>
> > On 03/12/2008, kirk <kirk.pepperdine@gmail.com> wrote:
> >
> >
> > > Hi,
> > >
> > >  I was looking at providing a particular load pattern on a server. When
> I
> > > wasn't seeing that load show up, I dropped some debug statements into my
> > > servlet code that printed the session id. What I found was that adding a
> > > cookie manager limited the number of sessions to the number of threads.
> > > However, setting the clear cookies check box didn't seem to allow the
> server
> > > to assign a new session id and hence, create new sessions once the
> thread
> > > restarts the thread group. Further more, one thread seemed to be
> carrying
> > > all of the load. Here is the output from my test servlet. The thread
> group
> > > is configured for 3 threads The cookie manager is set to clear cookies
> at
> > > the end of each iteration.
> > >
> > >  15nhcqlwugmkh
> > >  npli36fysau0
> > >  1nmwz0414pt0d
> > >  npli36fysau0
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  15nhcqlwugmkh
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  1nmwz0414pt0d
> > >  ...
> > >
> > >  Is this expected behavior?
> > >
> > >
> >
> > Difficult to say without knowing how the session ids are allocated and
> > how many samplers there are in the thread.
> >
> > You might find it helpful to turn on debugging for the Cookie Manager
> > (e.g. select it and use Help/Enable debug).
> >
> > The View Results Tree Listener can be used to show the cookies; you
> > can see noew ones are being sent by the server.
> >
> > Server cookies are also stored as variables, so you could save those
> > in the JTL file:
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables
> >
> >
> >
> > >  Thanks,
> > >  Kirk
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > >  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
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
>  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


Mime
View raw message