stefun
stefun

Reputation: 1551

Solve 429 Too Many Requests issue while load testing using Jmeter

I'm trying to hit the server with multiple requests for load testing. I have setup JMeter thread with 100 concurrent users per seconds. Each request read data from CSV (different tokens to identify users). But after few request I'm getting error:

429 Too Many Requests

How we can solve this? Any settings in Jmeter?

Or Do I need to change Apache settings?

Upvotes: 1

Views: 13058

Answers (2)

Dmitri T
Dmitri T

Reputation: 168197

As per HTTP Status 429 documentation

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.

Most probably your JMeter test configuration is not correct, the reasons could be in:

  • You don't use HTTP Cookie Manager so all the requests fall under the same session and application reacts correspondingly
  • Your application limits rate of requests from a single IP. Consider going for IP Spoofing or Distributed Testing or both
  • You're using the same credentials for all virtual users, make sure that each JMeter virtual user has its own credentials and operates its own data. You can use i.e. CSV Data Set Config for parameterization.

Upvotes: 2

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34566

This is most probably a DDOS protection in the application you’re testing so your options are to ask the infrastructure team or developers to disable it.

As per reference documentation:

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.

There is nothing you can do ok jmeter side.

Upvotes: 0

Related Questions