2

I have a scenario to do load test.

Ex : Each user has to request to 10 urls in the application.This scenario has to be done for 500 or more users .

But when I am trying with 20 users it's giving a "500-Internal server error". Up to 15 users it's serving properly .

Where it is went wrong? From server side or coding side?

And also I want to know what would be the server configuration for serving more than 500 requests

2

You can capture the server utilization by yourself too either use the Jmeter plugin

http://jmeter-plugins.org/wiki/StandardSet/

this will provide you the CPU, Memory, Network I/O etc. utilization of the server and then you can check whether any of these things are creating bottleneck for you. may be you will find that on increasing the number of users from 15 to 20, CPU usage goes beyond 90% which is too high.

For resource utilization if you don't want to use the plugin then you can use the 'Perfmon' inbuilt tool of windows (but only if you have Windows based server).

Another is to verify which URL out of the 10 under test is creating a bottleneck i.e. 500 error is being reported by which URL and then your probability of finding URL for debugging will increase.

You can also contact the Developer or IT-Admin team to ask, if the server is blocking more than 15 requests from the same IP, may be your application does not allow this thing, so for load testing you need to get this thing turned-off from the Load Test server (we sometimes have to do such tweaking for load testing), as some application and some times IT team deliberately apply this kind of setting to block multiple requests from single IP, just to keep network traffic in control and prevent unwanted requests hitting servers for security reasons.

One more way of debugging is increase your load in stepped way i.e. try running your script for 1, 5, 7, 10, 15, 17, 20 users load and see the Throughput graph of your results, if it shows a parabolic path or you may observe that every time your Throughput increases up to 15 users but for 17 and 20 users it goes on decreasing then, you hit the break point and your server is not capable of handling more than 15 requests. In that case try upgrading the hardware e.g. add some Memory or an extra core for handling more users and then again execute your script.

1

Good you found a bottleneck, now as with all automated test failures you can question, is it the test, the code or the infrastructure. We cannot answer your situation for you.

I would advice to have a developer and a server-admin nearby when performing load tests. The server-admin should monitor and configure the infrastructure and when the infrastructure is not the issue then consult the developer to see if its a test or code issue.

In your case you need to research why you are getting 500 errors, check server logs, application logs, etc...

Possible other load-test issues you could run into:

  • Max number of connections on the test computer, but also on the server-side
  • Firewall blocking with denial of service protection

Remember what your goal is. My personal load testing goal is often to find bottle-necks in the full-stack, from client, to application, to database and back. Which part of the stack handle the least am-mount of connection/data, what area needs focus of performance improvement. Other-wise it could be to guarantee being able to handle X number of users over a given time.

  • Thanks for your answer. I want to know what would be the minimum server configuration required for serving more than 500 requests – QAMember Jul 21 '15 at 10:11
  • I am getting 500 errror due to "response is null " – QAMember Jul 21 '15 at 10:12
  • 1
    The number of requests per second a server can handle is so depended of its configuration: disk-speed, number of CPU's, memory usage. Performance issues could be in network, database, code, disk-IO, memory, caching, etc... levels. Hence the reason you want to do a load test, you want to find out which level is the bottleneck. For some reason your application is giving response null. Sounds like its time to DEBUG real-time during a load-test session and figure out why its not returning the expected value. – Niels van Reijmersdal Jul 21 '15 at 10:38
1

Here are few potential problems along with possible workarounds:

  1. You're hitting hardware limits, i.e. server doesn't have enough CPU, RAM, Network or Disk IO to handle 20 users. It may be tested via PerfMon plugin
  2. Errors are caused by network connection between JMeter and Application Under Test issues. Check Connect and Latency metrics.
  3. If points 1 and 2 are fine, it may be something wrong with underlying software (HTTP/Application server, database, proxy, etc.) Usually default installation isn't suitable for high loads to it needs to be tweaked.
  4. And finally it may be a problem with your application code. In that case look into the logs and use profiler tool to see what happens under the load and where the bottleneck is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.