-1

I'm encountering an issue while load testing my Node.js Sequelize PostgreSQL application running on an NGINX server using JMeter. When I set 1000 threads with a 1-second ramp-up time, everything runs smoothly. However, when I increase the load to 10,000 threads with a 10-second ramp-up time, some calls fail with errors such as "connection refused," "connection timed out," or "failed to connect to server."

To troubleshoot, I performed the same load test directly on the NGINX API without involving Node.js. Surprisingly, I still encountered similar issues, even though NGINX returned a 200 status code.

I suspect there might be a misconfiguration in my NGINX setup. Any insights on how to diagnose and resolve this issue would be greatly appreciated.

3
  • what's the value of worker_connections in your nginx config? nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes Commented May 15, 2024 at 8:48
  • Would be great to see nginx.conf file, also need to tune network stack in server. You can contact me in LinkedIn (see my profile) I'll help You via skype or zoom. Commented May 15, 2024 at 10:34
  • also do tail -f /var/log/nginx/error.log and tail -f /var/log/nginx/access.log to see what's nginx alerting when ddosing it. I suspect port limits, open file limits, workers count, read timeout (which should be small to make "slow" clients to be kicked out). Commented May 15, 2024 at 10:47

1 Answer 1

1
+50

it seems that when you send 10,000 threads then it reach the connection limit. try to increase number of connections.

    events {
           worker_connections 10240; # Adjust this number as needed for this may be 10, 000 +
     }

along this check the keep_alive option, i.e how many request can be entertained

keepalive_requests  10000; # Adjust this number as needed for this may be 10, 000 +

if you go outside the nginx may be you can try to update the system limits:

    * soft nofile 100000
    * hard nofile 100000

Please try the solutions, this mainly seems to be the request limit issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.