6
votes

Trying to hit Rest API web service through Jmeter for a range of users. (20, 30,50,80 users). 80% of the request samples get processed, but around 20% of the samples error out with below message under sampler Result.

"Response code: Non HTTP response code: java.net.ConnectException Response message: Non HTTP response message: Connection timed out: connect".

Is it the issue with Jmeter or server side? What is the resolution for this?

2

2 Answers

1
votes

Usually timeout indicates a problem on the server side. Few things to check:

  1. Make sure that your web server and/or database are configured to accept as many as 80 concurrent connections
  2. Monitor your server status during the load test manually or i.e. using JMeter PerfMon plugin to see whether the server is capable of bearing such load.
  3. Try playing with ramp-up to gradually increase the load to determine the point where time outs start occuring
  4. Alternatively you can limit requests per second via Constant Throughput Timer and increase its value to get exact maximum requests per second your application is able to handle - perhaps it'll give you some clues.
0
votes

It basically happens when your request is taking longer time to get the response back, lets say 62 Seconds.

In this cases by default the ELB has 59 Seconds time out condition , that means if any request is in time wait state for than 59 seconds , it would be automatically killed by ELB mentioning "gateway time out or Connection time out "