When I run my Jmeter test script via command line with a thread count of up to 200 the test executes properly and at the end closes all processes and generates a proper result file. All this takes about 5 minutes.
As I increase the number of threads to 300 or more, and execute the test, it the just keeps on executing and just doesn't end. Doesn't matter if I leave it for a whole day still the test doesn't end until I manually end the test by Crtl + c or closing the command prompt itself.
Any probable reason why the tests just won't stop for a high number of threads?
The only way to get the reason is looking into jmeter.log file and taking a thread dump using jstack command to see where it hangs and why. You can also add the following line to user.properties file:
and look into .jtl results file to see whether it is being updated. You can also open it with the listener of your choice in GUI mode to see whether response times are reasonable as it might be a problem on the application under test side.
However it might be the case of incorrect JMeter configuration, like:
JMeter comes with default Java Heap size of 512MB which is not enough for massive load testing
People often use a lot of listeners during test run, it does not make sense and slows the things down greatly
Inefficient usage of assertions, timers, post processors can also be the cause.