2

Is it possible to hold a session for a certain period of time using JMeter? While using "Ultimate Thread Group" it seems that it is holding the threads but in the mean time requests are flooding my server. I have used "Constant Through Timer" to control the flow of transactions.

Here is my script detail:

->Simple Login request.

-> Ultimate Thread Group: Start Thread Count-100 ->Startup time-120 ->Hold load for-120  ->Shutdown Time-60

-> Constant Throughput Timer- Target Throughput(1200/min).

All the threads are up within 120 seconds and after that, this load will be hold for another 120 sec. So for this total 240 seconds login requests will be sent using different login credentials.My query is: Are all those logged in request hold in the server for that period of time? Are all those login sessions are active on the server for 120 users or threads?

1

That depends on how your system defines a login session. Typically it is the server, not the client, that decides when a login session is over. You need to figure out (or ask a developer to describe) the session lifecycle for your system.

  • Under this circumstance, session timeout is 30 minutes on the server.xml file and in http.d.config file MaxKeepAliveRequests is default 100. So for my test script will those logged in sessions will be alive throughout the test runtime? or does it mean that concurrently only 100 sessions will be active while I'm running the test? I'm my test I observed that within the test duration(300 seconds) around 6500 login requests were generated by 100 threads. What I want to know is : Are all those sessions will be alive throughout the test duration? All tests are run in non-GUI mode. – Adnan Apr 21 '16 at 5:06
  • MaxKeepAliveRequests has to do with TCP connections, which is different from an HTTP session. – user246 Apr 21 '16 at 11:27
  • I have allowed "keepAlive" in "HTTP Request" sampler. It's a business requirement to determine the average response time for login request while a certain number of connections are alive/active/open for that time. – Adnan Apr 21 '16 at 17:23
  • Whether a login session is still active is independent of whether a TCP connection is still open. The KeepAlive time impacts how often the client (presumably a web browser) has to open a new connection to the server. The login session does not go away when a TCP connection is closed. Perhaps it would help for you to learn about how web applications use cookies and URL-rewriting to implement sessions. – user246 Apr 21 '16 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.