Vaibhavi Sharma
Vaibhavi Sharma

Reputation: 1

API testing with jmeter "too many attempts error"

Thread Name:Thread Group 1-62
Sample Start:2020-07-14 23:30:42 CDT
Load time:721
Connect Time:350
Latency:721
Size in bytes:337
Sent bytes:640
Headers size in bytes:308
Body size in bytes:29
Sample Count:1
Error Count:1
Data type ("text"|"bin"|""):text
**Response code:429
Response message:Too Many Requests**


HTTPSampleResult fields:
ContentType: text/html; charset=UTF-8
DataEncoding: UTF-8

===================================================

while testing API in jmeter above error code is coming after 60 thread why this is coming and how we can solve this error?

I am using 100 thread in 10 second for loop count 1.

Upvotes: 0

Views: 1525

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

The error is self-explanatory, as per 429 Too Many Requests HTTP Status code description:

The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting").

A Retry-After header might be included to this response indicating how long to wait before making a new request.

So the options are in:

  1. Use different credentials for accessing your API as it looks like your application has rate limiting applied (if the rate limiting user-based), it can be done using i.e. CSV Data Set Config
  2. Ask developers/sysadmins/devops to turn off this rate limiting for the time frame of the performance test
  3. Limit the rate of your requests to the one which your server can handle, it can be done using i.e. Constant Throughput Timer or Precise Throughput Timer or just increase ramp-up time unless you stop seeing this error

Upvotes: 1

Related Questions