Why do I get internal server error with JMeter 5.1? - jmeter

I am migrating scripts from version 2.9 to 5.1. One request is failing in both versions sending me this error:
:internal server error code 500.
What could be the issue?

Almost each JMeter version contains some incompatible changes, you need to walk through the JMeter Changelog, identify all the changes and properly amend your script.
Given JMeter 2.9 was released in February 2013 and now we're in March 2020 I believe it would be easier to record the tests from scratch as application could change in 7 years hence "old" JMeter scripts are not valid anymore.
With regards to HTTP Status Code 500
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.
This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response. Sometimes, server administrators log error responses like the 500 status code with more details about the request to prevent the error from happening again in the future.
So you need to look into your server logs, most probably you will get the clue regarding what went wrong from them.

Related

Jmeter | API 500 internal server error | Back End Server : Azure Appservice

I am getting API 500 internal server error while trying to requests a high number of the load. Some of the threads are only getting 500 internal server error, other threads are working fine.
Is there any way why the API is throwing 500 internal server error.
Could you please tell me Is that server-side issue or Jmeter-side issue.
I am just confused whether it is a jmeter issue?
Your question contains the answer already:
500 internal server error
If you look at HTTP Status Code 500 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.
This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response. Sometimes, server administrators log error responses like the 500 status code with more details about the request to prevent the error from happening again in the future
So I would say that it's a server-side issue, if you want to get to the bottom of it:
Check health metrics of your website
Increase ramp-up period in order to identify how many users can be normally served and what is the "critical" amount when the errors start occurring, you can correlate the following charts:
Active Threads Over Time - to visualise users arrival
Response Codes Per Second - to see the HTTP Status codes over time
Response Times Over Time can also be useful to see whether response time increases as the load increases, this way you will be able to find the saturation point

Internal Server Error(500) while running load test in JMETER

I am unable to get response from server so how will correlate dynamic values too
As per HTTP Status Code 500 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.
This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response. Sometimes, server administrators log error responses like the 500 status code with more details about the request to prevent the error from happening again in the future.
If your test works fine with 1-2 users and you're seeing this HTTP 500 error only when your application is under the load, most probably your application gets overloaded hence fails to provide valid response.
You can already report it as the bug, or if you want you can investigate it a little bit further, to wit:
Use Active Threads Over Time and Response Codes per Second to see when these errors start occurring (i.e. application works fine till 200 concurrent users and after 201 it starts throwing HTTP 500 errors)
Inspect your application logs
Make sure that the application has enough headroom to operate in terms of CPU, RAM, Network, Disk, etc, you can use JMeter PerfMon Plugin for this
Inspect your application middleware configuration and logs (load balancer, application server, database, etc.)
Consider collecting APM and/or profiler tools output during the load test execution, this way you will be able to precisely identify the root cause of the problem

Getting 400 error with multiple request in jmeter

I am requesting for an endpoint which actually creates a task so when I am trying to execute my jmeter script with 500 threads then I am facing some issue. For first 200 threads I am getting 200 response and after that I am getting 400 Bad Request error with the same end point.
Please help me out in this.
Thanks.
Could you check the status of your web server?
There are possibility that web server's connection pool is full.
As per HTTP Status Code 400 documentation
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
So I would recommend:
Double checking your request details (url, parameters, etc.) using i.e. View Results Tree listener
Check jmeter.log file for any suspicious entries
Review your test configuration, for instance if you use CSV Data Set Config which is set not to recycle at the end of file you will be sending <EOF> instead of real values which will not be accepted by the server
Make sure to follow JMeter Best Practices as it might be the case JMeter cannot conduct more than 200 virtual users load due to lack of resources

JMeter : 500 Internal server error (calling API)

Hi Guys does anyone know about 500 internal server error when calling API?
I have an application where one of the functionality gets the data from API
so, i am doing jmeter perfomance tessting on the functionality
1) I recorded scripts using the jmeter proxy (Https recorder)
2) i added the listner
3) ran the script with jus tone thread
I saw 500 Internal server error in Response (please click the below link to see the error screenshot
error screenshot
Is something related to the api server calling using proxy or its problem with my script ?
Please tell any solutions how to do the performance testing on this scenario ?
Your question doesn't have enough information to figure out the cause of the failure so I can only give a piece of general advice:
Capture the request send to the endpoint by the real browser, you can use browser developer tools or external sniffer tool like Wireshark or Fiddler
Do the same for JMeter, either inspect request using View Results Tree listener or the aforementioned sniffer tools
Given requests are the same (apart from dynamic values which need to be correlated or parameterized) you should be getting the same response

What raises HTTP 503 and how to change timeout?

I have inherited an application (internal to my company) that uses javascript running in Internet Explorer which makes Ajax calls to a Struts-based application running in WebLogic Server v10.
Certain server-side operations in the system are taking longer than 3 minutes. Users consistently noticed that the Ajax call returns 503 error at the 3 minute mark. My users can wait longer than 3 minutes, but 503 errors interrupt their work.
This application needs to be performance tuned, but we badly need a temporary workaround to extend how much time can occur before a 503 error is returned.
The current theory is that the 503 error is being raised by the IE XMLHttpRequest object. A team of supposed WebLogic experts poured over our code and WebLogic logs, and declared that there's no timeout occurring on the server side. But I have my doubts.
My question is, which piece of software is responsible for raising 503 error: the browser, the Ajax javascript, or the server? And can this timeout period be changed?
A 503 error is kind of a catch-all for a lot of different types of errors, usually on the server side. In your case it could be that the server is just rejecting the connection after a certain timeout, and responding back with a 503 to indicate that the server is overloaded or cannot process your request.
A lot of times with web services, a 503 will be returned when the server code throws an exception or error. If the server code doesn't properly handle the error, it will bubble up to the server, which will just respond back with a generic 503.
http://www.checkupdown.com/status/E503.html
Error code 5xx (alternate definition)
RFC 2616
503 is a server error. XMLHttpRequest will happily wait longer than 3 minutes. The first thing you should do is satisfy yourself of that by visiting the problem URL in telnet or netcat or similar and seeing the 503 with javascript out of the picture.
Then you can proceed to find the timeout on the server side.
Your web server has a request reply timeout which is being tripped by long-running service requests. It could be the WebLogic server or a proxy. It is certainly not the client.
Have you considered submitting an asynchronous HTTP request that will be responded to immediately, and then polling another location for the eventual results? Three minutes is about 170 seconds too long.
503 is most likely due to a timeout on the server. If you can tune your Apache server, read about the Timeout attribute that you can set in httpd.conf.
Look in the httpd/logs/error_log to see if timeouts are occurring.
Refer also to this answer: Mod cluster proxy timeout in apache error logs .

Resources