java.net.SocketException: Connection reset 3 in jmeter - jmeter

Am testing with an realtime application upto 40 users everything going fine after 40 users if i increased users to 45 or 50 and so on getting java.net.socketexception:connection reset errors could you please suggest a solution for this?

Most probably it indicates an issue with your application, check if there are any suspicious entries which can shed light on the root cause in your application logs. It might also be a configuration issue of any middleware (load balancers, routers, switches, proxies, etc.)
If you absolutely sure that your application behaves as expected you can tune JMeter to do retries on connection resets (however this will make your test not realistic from browser perspective), in order to do this:
In user.properties file add the next lines:
httpclient4.retrycount=1
hc.parameters.file=hc.parameters
In hc.parameters add the next line:
http.connection.stalecheck$Boolean=true
Restart JMeter to pick up the changes.
References:
Connection Reset since JMeter 2.10 ?
Configuring JMeter
JMeter Properties Reference
Apache JMeter Properties Customization Guide

Related

JMeter httpclient.timeout property not working

In continuation to working on this issue - JMeter test not stopping after duration ends in distribution mode
Using JMeter version - 5.4
I got a thread dump and figured out few threads are getting stuck on HTTP Requests.
The resolution figured out is to set timeouts for the HTTP Requests as mentioned here - Configuring response timeout in Apache JMeter
But I'm not the author of the test plan. Hence, the only way I could use is to set JMeter properties.
I've set the following in jmeter.properties (values are for local testing):
httpclient.timeout=100
hc.parameters.file=hc.parameters
os_sampler.poll_for_timeout=100
and in hc.parameters
http.socket.timeout$Integer=100
But unfortunately none of these are working.
The only timeouts working are the ones when I set them in Advanced Tab of HTTP Sampler of the test plan.
Do we have any platform recommendation to control this behavior (like some other setting or property etc.)? Or am I missing anything in the above mentioned properties?
Also, I do sometimes get this exception in response, but I highly doubt if this is related?
Non HTTP response code: java.net.BindException
Non HTTP response message: Address already in use: connect
Your steps are correct so it looks like a bug in JMeter, presumably a side-effect of this commit so you have 2 options:
Downgrade to JMeter 5.0 where this functionality is still working
Raise an issue in JMeter Bugzilla but you will need to wait until someone fixes it and then either for a nightly build or a new release containing this fix
Fix it yourself and contribute the fix to the upstream

How can be set the network Bandwidth while load testing of any application using jmeter

I am doing the load testing of our API using jmeter. Now I need to set the network bandwidth to 256kbps and 512kbps.
I added below lines in apache-jmeter/bin/jmeter.properties but that didn't works.
#httpclient.socket.http.cps=32728
#httpclient.socket.https.cps=32728
is any other approach to set the network bandwidth or any other best tool for this requirement?
You need to remove this # character as it indicates a comment therefore JMeter ignores this line
It's better to make configuration changes in user.properties file, this way you will get confidence that your setup will survive upgrade to the most recent JMeter version
More information: How to Simulate Different Network Speeds in Your JMeter Load Test

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.

JMeter Recording - All actions cannot be performed

While recording a workflow through JMeter proxy, I am not able to click some items(like buttons), which otherwise are available when the website is getting loaded without JMeter proxy.
Now, needless to say, i have to click those buttons to perform certain activities essential as a part of the workflow whose performance I want to measure.
I am quite new to JMeter, so not sure how to proceed with the problem. Is there any Proxy settings i should change?
When I am checking the website source there is no difference between the page getting loaded via proxy and the page without it.
Please let me know if additional info is required. Thanks in advance!!!
Check jmeter.log file (usually lives in JMeter's "bin" folder or folder, you launched JMeter from if it's different) for anything suspicious. Log file should be the first place to look into as JMeter basically writes anything there.
You can increase verbosity if required by adding the next line to user.properties file (again lives in "bin" folder of your JMeter installation)
log_level.jmeter.protocol.http.proxy=DEBUG
Try cleaning your browser history, it's better to delete everything, especially cache.
Try re-installing JMeter certificate. See Installing the JMeter CA certificate for HTTPS recording chapter of the HTTP(S) Test Script Recorder (was: HTTP Proxy Server ) for instructions
If above steps won't help and you're absolutely sure you're doing everything right you can try raising a JMeter issue
Also be aware of JMeter Chrome Extension which is an alternative way of recording a JMeter test which doesn't require proxy server.

Jmeter http request sampler not working when it goes idle

I am using JMeter 2.11 for simulate 10000 thread users. I use CSV data set config to simulate 10000 user load and take 2-3 HTTP request in my test plan. All 10000 user load applied successfully by Jmeter but main problem is when my last request goes idle (as I put my Jmeter http request on home page of my website) all sessions goes timed out after some time.
I also configure "app pool's Idle time out=0" and my application's web config's "session state timeout is 20" (I also increase this time from 20 min but no way). Also Keep Alive is checked on all http request.
Please suggest me what to do for keep my last request's session alive.
JMeter threads are never idle, if thread doesn't have any more samplers to execute or no more loops to iterate it's being shut down. 10 000 users is quite a high load, it might be a problem with your JMeter configuration, i.e. it is not capable of generating and sustaining 10 000 threads. In 99% of cases jmeter.log file has enough troubleshooting information.
In the meantime few recommendations:
Upgrade to the latest version of JMeter (for the moment it's Apache JMeter 2.13)
Make sure you use 64-bit server JRE or JDK
Provide JMeter enough Java Heap space, by default it comes with 512Mb only which is not enough to simulate 10k users
Run JMeter test in non-GUI mode
Disable all Listeners during test run
See 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure for above points explained and few more tips and tricks.

Resources