1

When I run Jmeter from Windows CLI, after some random time, the tests are being stopped or stuck. I can click on ctrl+C (one time) just to refresh the run but part of the request will be lost during the time it was stuck.

user16217248
  • 3,119
  • 19
  • 19
  • 37
FeelGood
  • 11
  • 3
  • Any solutions? Mine "sleeps" after at least 12 hours. It then continues from where it last stopped upon me logging back in to the computer. Are we facing the same issue? – Beast May 02 '23 at 02:27

2 Answers2

0
  1. Take a look at jmeter.log file, normally it should be possible to figure out what's wrong by looking at messages there. If you don't see any suspicious entries there - you can increase JMeter's logging verbosity by changing values in logj2.xml file or via -L command-line parameters.
  2. Take a thread dump and see what exactly threads are doing when they're "stuck"
  3. If you're using HTTP Request samplers be aware that JMeter will wait for the result forever and if the application fails to respond at all - your test will never end so you need to set reasonable timeouts.
  4. Make sure to follow JMeter Best Practices
  5. Take a look at resources consumption like CPU, RAM, etc. - if your machine is overloaded and cannot conduct the required load you will need to switch to distributed testing
Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

There are several approaches to debugging a JMeter test which can be combined as a general systematic approach that I capable of diagnosing most problems.

The first thing that I would suggest is running the test within the JMeter GUI to visualize the test execution. For this you may want to add a View Results Tree listener which will provide you with real time results from each request generated: enter image description here

Another way you can monitor your test execution in real time within the JMeter GUI is with the Log Viewer. If any exceptions are encountered during your test execution you will see detailed output in this window. This can be found under the Options menu: enter image description here

Beyond this, JMeter records output files which are often very useful in debugging you load tests. Both the .log file and the .jtl file will provide a time stamped history of every action your test performs. From there you can likely track down the offending request or error if your test unexpectedly hangs: enter image description here

If you do decide to move your test into the cloud using a service that hosts your test, you may be able to ascertain more information through that platform. Here is a comprehensive example on how to debug JMeter load tests that covers the above approaches as well as more advanced concepts. Using a cloud load test provider can provide your test will additional network and machine resources beyond what your local machine can, if the problem is related to a performance bottleneck.

Lemonseed
  • 1,644
  • 1
  • 15
  • 29