0
votes

I have designed a test thread inside JMeter, sometimes, when running it through GUI, the test thread is just hang up and never end.

  1. By clicking "STOP" or "Shutdown", it will show "Shutting down all test threads. You can see number of active threads in the upper right corner of GUI. Please be patient.", and the thread will never be stopped.
  2. By closing the dialogs, it will show "One or more test threads won't exist; see log file.", but there is no error log in jmeter.log.

The structure of the JMeter:

  • Test Plan
  • ----User Defined Variables
  • ----HTTP Request Defaults
  • ----Thread
  • --------HTTP Cookie Manager
  • --------HTTP Request
  • --------Loop Controller
  • ------------CSV Data Set Config
  • ------------HTTP Request
  • ----------------Beanshell PreProcessor
  • ----------------HTTP Header Manager
  • ----------------Response Assertion
  • ----------------Beanshell Assertion
  • --------HTTP Request
    1. How can I locate the root cause of this error? --"One or more test threads won't exist; see log file."
    2. How can I fix it?
    2

    2 Answers

    0
    votes

    You're violating at least 2 JMeter Best Practices, to wit:

    1. You're running load test using JMeter GUI, you should execute it in non-GUI mode
    2. You're using Beanshell test elements, you should use JSR223 Test Elements and Groovy language instead

    Depending on the nature of your test plan, request and response size and number of threads you might also need to perform finer tuning of JMeter (i.e. increase JVM Heap size, play with GC parameters, etc.) Check out 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article for more details on getting the most of JMeter instance.

    If after all you will still be experiencing problems it might indicate that the machine lacks resources (you can check it using i.e. JMeter PerfMon Plugin) and if this is the case - you will have to go for distributed testing.

    0
    votes

    Most probably you didn’t set in HTTP Request Defaults in Advanced tab:

    • connect timeout : reasonable value 500
    • response timeout : reasonable value 30000

    So some http request hangs and a thread does not exit