Using 50 threads in JMeter but application logs out - spring

I have test cases properly created and compiled in JMeter using the badboy. I ran the test for 1 Thread 1 ramp-up period and 1 Loop count (screenshot of the settings are attached with the query) and the test runs completely fine. Now I increased the Threads to 20 and it runs fine but when I start increasing it more like 50 or 80 threads then after few test cases the script logs out. I am testing an application based on JSF and I have taken care of the faces issue where the ViewState have to be passed to every next request being sent so the session is maintained. The problem here is that when the number of threads increases the application takes me to the login screen after a few steps.
I have also tried by un-ticking the option "Delay Thread creation until needed"
Kindly suggest a solution
JMeter Version: 3.2
Thanks and regards,
Prasad Iyer
[Thread Setting for 1 user][1] [1]: https://i.stack.imgur.com/bcVub.jpg
[Thread Setting for 80 users][2] [2]: https://i.stack.imgur.com/rJ4gA.jpg

Blind shot: add HTTP Cookie Manager to handle JSESSIONID and other cookies (in some installations you will need HTTP URL Re-writing Modifier)
If it is already there (or does not help) inspect your application under test logs, most probably you will find some errors there (you might need to increase logs verbosity)

Related

All threads in jmeter gets completed but the console info is updating for more than 2 hour

I run a performance test with load 25 users with jmeter integrated with jenkins.Once the build is triggered all my thread groups are completed but the console process is running for close to 2 hours.
image here
In your image I see 500 users, not 25.
Also I see that 498 users have finished and 2 are still running.
I cannot state for sure why they are running, it's more a question to you. I can think of the following reasons:
You're not following JMeter Best Practices
JMeter lacks resources and got stuck i.e. in endless garbage collection (which is a subset of point 1)
JMeter waits for response from the server and the server fails to respond. By default JMeter's HTTP Request samplers don't have any timeout defined and it means that JMeter will wait forever, so make sure to set reasonable connect/response timeouts, the setting lives under "Advanced" tab of the HTTP Request sampler (or better use HTTP Request Defaults so you could set the timeout for all the HTTP Request samplers in one shot)
If nothing helps you can check what exactly threads are doing and where they're stuck by taking a thread dump

Jmeter threads are not ramping down

I am doing a load test of 300 Virtual users on an application. Previously my users were ramping down and test seems to be finished with in time But now as I jump to 500 user test my users are not ramping down and test keep running for like infinite amount of time. Again I run the test with 300 users, 37 users are still in the system and are not ramping down. Hence my test did not finish.
These are the things that I tried to fix,
Increase the HEAP size in jmeter.properties file.
Cleared the cache and rebooted the services (i.e. SQLSERVER and
collab services)
Can anybody suggest that where Iam doing wrong?
It might be the case your server fails to provide response, by default JMeter will wait for the response forever, it might explain the situation you're running into.
There is "Timeouts" section on the "Advanced" tab of the HTTP Request sampler (or even better HTTP Request Defaults configuration element) where you can set maximum values for Connect / Response, in case if they are exceeded JMeter will automatically mark the sampler as failed and proceed.
Alternative options:
You can set maximum test duration using "Scheduler" section of the Thread Group
There is Runtime Controller where you can define for how long its children are allowed to be run.

how to interpret Jmeter thread configuration

I am trying to stress test a web application which is composed of login,view page,other pages and log out. The full flow contains 14 request and I have created 300 users to complete the flow.
I have the following Thread Group configuration:
According to the online resources since I have 300 users and the ramp up period is 6, for each 1 second there will be 50 thread added. Therefore all the 300 thread will be up and running after 6 second.
So can I conclude that after 6 second Jmeter will have 300 active thread accessing the website at the same time?
My second question is when I execute the load test of more than 100 users when I view the Result Tree Listener in the Sampler Result tab the following error is triggered only for js and css files but when I open the response data tab for that request it is displayed correctly.
Response code: 200
Response message: Embedded resource download
javax.net.ssl.SSLHandshakeException message:Non HTTP response message: Remote host closed connection during handshake,
Is it a performance issue of my website or Jmeter cannot download all the js/css files?
Thanks in advance
With regards to your Threads configuration, the actual concurrency will depend on your application response time. JMeter acts as follows:
Each 1 second JMeter will start 50 users
Each of 50 users will start executing your 14 requests upside down
When a user will finish executing all requests it will be shut down
So given your application average response time for all 14 requests is > 500 ms you should have 300 concurrent users. You can always check how many users were online using Active Threads Over Time listener. See JMeter Test Results: Why the Actual Users Number is Lower than Expected article for more detailed information on the topic
Too little information to provide the answer check jmeter.log and your application under test logs for any clues. One thing is obvious: you should definitely NOT be running JMeter in GUI mode especially with View Results Tree listener enabled as it is too resource intensive and side effects might be unpredictable. So repeat your test in non-GUI mode with all listeners disabled and if the issue will remain - inspect log files.

jmeter all other threads are stuck when it is not getting response for one Thread

I am new to jmeter.
I am doing load testing on web application using recording feature in jmeter.
The issue is, If I'm giving say 100 with 100s ramp up time in Thread pool for 50 continuous web requests(sequence of web application flow).
If the server is not responding at 25th request(total 50) of 45th Thread(total 100) it is stuck at that point and not sending requests for remaining 55 threads.
What should I do.? is there any other method to initiate the threads.
it is not sending the threads because of many reasons
1. jmeter memory print you need to check
2. the server you are targeting will accept only no of threads.
etc are there.
if each thread processing time will take x amount of time hence n threads with x amount of time the processor is busy .
if your targeting server can only process 40 in this case i am assuming capacity as 40 , then the 41st request will only get chance , only at least one of the previous request get processed or released the thread .
too many threads might cause STUCK or BLOCKED threads at the server end in that case we either dont see response or error code . try stopping the threads you see all the reaming as failed requests
JMeter shouldn't normally act like you described. Check out jmeter.log file, it usually should have enough information to get to the bottom of problem.
It looks like you're trying to run the load test using JMeter GUI. If it's the case - please don't, JMeter is not designed for producing high load in GUI mode.
Run your test in command-line mode
Delete or disable Listeners if any
Increase JVM Heap size, JMeter comes with very little value by default.
Follow other recommendations from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article

JMeter hangs during performance testing

I am trying to simulate 100 threads request with 4 different users, all the 97 requests were sent and received but the remaining 3 requests still showing as executing.
I have to manually stop the Jmeter and then only the remaining request are passed.
Why is this happening?
Your machine probably doesn't have the resources to execute the requests or Java isn't configured appropriately. Take a look at this article and this one
In case you are running jmeter in a window mode, please check for attributes provided for heap memory etc. (those should not exceed more than half of the RAM on the machine you are running upon)

Resources