5

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 discover the cause of the message: is the app waiting for something to process, or slow SQL, or hung thread, or application is refusing connections because maxed out?

How can I find why this exception is thrown, and how can I fix it?

halfer
  • 19,824
  • 17
  • 99
  • 186
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
  • @Raedwald, in JMeter test results there are no stack trace available to track down the application, and also my application don't throw exception to trace either, so please take the close vote. – Mahmoud Saleh Jul 06 '14 at 19:27
  • @Raedwald if you have experience with JMeter you will know what i am talking about, please don't underestimate me that much, this answer is humiliating to my experience :( :( – Mahmoud Saleh Jul 06 '14 at 19:29
  • Is it happening with 1 thread? If it happens when you increase users - it could be your application issue. if not, Do you have enough heap set for JMeter? – vins Jul 07 '14 at 20:02
  • What's the mystery? There is only one reason. The read timed out. The server didn't send anything within the timeout period. – user207421 Sep 11 '19 at 21:04

1 Answers1

-1

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.

eugene.polschikov
  • 7,254
  • 2
  • 31
  • 44
  • 1
    i am using blazemeter to run my test scripts, any ideas how to debug ? – Mahmoud Saleh Jul 07 '14 at 20:24
  • What about idea to export your blazemeter script in jMeter using this button: http://gyazo.com/249f1a3de843aef963981ae068327385 , and try to perform your script in jMeter taking into consideration what I've mentioned you above ? – eugene.polschikov Jul 07 '14 at 21:36
  • 1
    btw, I notice that response looks like "Non HTTP response code:" . Are you sure that you use proper endpoints (webApi endpoint) of your application to perform HTTP requests ? – eugene.polschikov Jul 07 '14 at 21:37