JMeter: How to know the reason of java.net.SocketTimeoutException?

Mahmoud Saleh picture Mahmoud Saleh · Jul 6, 2014 · Viewed 13.5k times · Source

i am making load test for my web application, and i set the connect timeout and response timeout to be 20 seconds, and sometimes i am getting exceptions like:

Non HTTP response code: java.net.SocketTimeoutException: Non HTTP response message: Read timed out

i get the above exception in JMeter test result, and there are no errors thrown in my application, and no stacktrace available to trace the exception.

i want to know what is the cause of the message: the app is waiting for something to process or Slow SQL or Hung thread or application is refusing connections because maxed out ?

please advise how can i know the reason for this exception and how to fix it.

Answer

eugene.polschikov picture eugene.polschikov · Jul 7, 2014

I would recommend you improve debugging activities (in jMeter) in the following way:

  • try to add debug postprocessor to your http sampler

debugPostProcessor

  • launch log viewer (jMeter log viewer before any http sampler(-s)/script(-s) execution

log viewer

probably this could help you to figure out why you're facing socket timeout. Hope this helps you.