0
votes

I am running a Load Test on my .Net web application using Jmeter. Application Process: Launch - Login - Start Test - Answer Q&A - Home Page - Logout

Till 500 users or sometimes 750, the test is running successfully. But when I increase the load I get an Error:

Non HTTP response code: org.apache.http.conn.HttpHostConnectException/Non HTTP response message:
Connect to www.demoname.com:80 [www.demoname.com\/11.111.111.111] failed: Connection timed out: connect 

'11.111.111.111' - is my Server IP address

I have increased the jmeter.batch file Heap memory to HEAP=-Xms1g -Xmx4g -XX:MaxMetaspaceSize=256m

Apache Jmeter version - 5.1.1r1855137

Java Version - 1.8.0_221

Server Configuration: Standard D4 v2 (8 vcpus, 28 GiB memory)

How can I get rid of this error?

1
Do you run distributed testing? If not jmeter.apache.org/usermanual/…user7294900

1 Answers

0
votes

HttpHostConnectException is basically an instance of a ConnectException which:

Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the connection was refused remotely (e.g., no process is listening on the remote address/port).

So most probably the error is on your server side because JMeter attempts to establish the connection and fails to do this within the bounds of the defined timeout

  1. If you're absolutely sure that your application works normally you can increase connect timeout in HTTP Request Defaults

    enter image description here

  2. However a better idea would be getting to the bottom of the error and fixing it on server side, the most possible reasons are in:

    • your application is overloaded, i.e. lacks essential resources like CPU, RAM, Network, etc. Make sure to set up monitoring of these metrics using i.e. Azure Monitor or JMeter PerfMon Plugin
    • your application infrastructure is not properly configured, make sure to double check if your backend is properly tuned for high loads including IIS and MSSQL

    • it might be the case your application code is problematic, i.e. it cannot handle more than X users due to poorly implemented algorithms. Consider using a profiler tool like NProfiler or dotTrace to detect the most expensive functions, largest objects, etc.