JMeter Exceeded Maximum Number of Redirects Error Solution
While running performance test, JMeter allows maximum 5 redirects by default. However, if your system demands more than 5 redirects, it may result in JMeter exceeded maximum number of redirects error. In this post, we have listed down steps to overcome this error.
Actual error in JMeter:
Response code: “Non HTTP response code: java.io.IOException”
Response message: “Non HTTP response message: Exceeded maximum number of redirects: 5”
This error is noticed because JMeter allows maximum 5 redirects by default and your system may be using more than 5 redirects. You need to increase this count to more than 5 in jmeter.properties file. Follow below steps to achieve this.
- Navigate to /bin directory of your JMeter installation.
- Locate jmeter.properties file and open it in any editor.
- Search for “httpsampler.max_redirects” property in opened file.
- Uncomment the above property by removing # before it.
- Change to value to more than 5 Eg. 20.
- Save the file and restart JMeter.
If the above method doesn’t solve this error, check below items in your JMeter script.
- Try disabling follow redirects, and see what the first page says in the Tree View listener.
- Make sure you have HTTP Cookie Manager added and is properly configured.
After performing above simple steps, you should be able to get rid of JMeter Exceeded Maximum Number of Redirects Error successfully. Let us know how it goes for you in comments.
I tried all the above steps u mentioned by unchecked “Follow Redirect” checkboxes and again run my script but this time it does not shows response data in View result graph.
So, can you please tell me where i did wrong or how i will solve this problem
Before executing script you should add cookie Manager while getting redirection error.
I have applied before executing for me working fine.
I had already set max redirect:20 but still i getting an error. can you suggest me any way