JMeter threads hang in sockets and do not restart

25 views Asked by At

I'm running JMeter tests. However, after some time, I encounter several errors:

Non HTTP response code: java.net.SocketTimeoutException

And after that, the threads do not restart, although it says they are running. I tried to reproduce a similar issue from the GUI - I started several threads, clicked the "terminate" button, and one of them couldn't terminate at all as it continues to run indefinitely. I'm using VPN to connect to the local network, perhaps that's causing the problem. Is it possible to make it so that after such an issue occurs, the thread restarts?

For example, if the thread doesn't receive a response after 30 seconds, can a new one be created?

I enabled debug in jmeter.log, but it didn't help. I also tried to track it in JDK Mission Control, but couldn't understand the issue.

1

There are 1 answers

0
Ivan G On

JMeter "creates" the threads according to what you set in the Thread Group

  • Once started "thread" starts executing Samplers upside down (or according to the logic controllers)
  • When last Sampler in the Thread Group is executed next iteration starts
  • When there are no more Samplers to execute and loops to iterate (or test duration ends) the thread is being shut down
  • When the last thread is shut down your test ends

So basically when a timeout occurs the "thread" should proceed further. If it doesn't - most probably it's stopped either by JVM or OS or it isn't really stopped, you can take a thread dump and see what the threads are actually doing.

In order to avoid threads going out of JMeter control I would suggest setting reasonable timeouts using HTTP Request Defaults

enter image description here