API load testing in jmeter, while running for 100 users, 45 -50 users getting 200 reponse but remaining shows 500 internal server error

576 views Asked by At

i tried with one API for 100 users. for 50 users I am getting success response but for remaining 50 I am getting 500 internal server error. how half of the API's alone getting failed. please suggest me a solution

1

There are 1 answers

0
Dmitri T On

As per 500 Internal Server Error description

The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

So you need to look at your server logs to get the reason for failure. Most probably it becomes overloaded and cannot handle 100 users. Try increasing the load gradually and inspect relationship between:

  1. Number of users and number of requests per second
  2. Number of users and response time

My expectation is that

  • at the first phase of the test the response time will remain the same and the number of requests per second will grow proportionally to the number of users.

  • at some stage you will see that the number of requests per second stops growing. The moment right before that is known as saturation point.

  • After that response time will start growing

  • After that the errors will start occurring

You might want to collect and report the aforementioned metrics and indicate what is the current bottleneck. If you need to understand the reason - it's a whole big different story