0

I am executing one script using Jmeter for load testing.I am getting error in between lets say for eg. If I applied load of 500users, till 250 users threads are running successfully then error comes of connection timed out error.Then, again it running successful for some of threads then error.

Code is as follow:-

    Thread Name: Thread Group 1-1274
    Sample Start: 2016-09-15 15:02:13 IST
    Load time: 21004
    Connect Time: 21004
    Latency: 0
    Size in bytes: 2206
    Headers size in bytes: 0
    Body size in bytes: 2206
    Sample Count: 1
    Error Count: 1
    Data type ("text"|"bin"|""): text
    Response code: Non HTTP response code: java.net.ConnectException
    Response message: Non HTTP response message: Connection timed out: connect

Response headers:

HTTPSampleResult fields:
ContentType: 
DataEncoding: null

I need to break the server.

Can anyone help me for this?

3
  • You likely reached the limit of ports that operating system allows to open concurrently by default. Is it Windows, Linux or Mac? Commented Sep 15, 2016 at 15:18
  • Its Windows system Commented Sep 16, 2016 at 5:26
  • On Windows, follow this guide to check if ports might be an issue: msdn.microsoft.com/en-us/library/aa560610(v=bts.20).aspx. It boils to 2 parameters: MaxUserPort, which by default is, I believe, 5000, but I suggest on JMeter machine to increase it to max 65534. And second, often even more important, is TcpTimedWaitDelay, which defines how long the ports are staying in TIME_WAIT state after use. Default is I think 240 seconds, which is way too long - it means that port will sit there for 3 min idle, and nobody can use it. Change that value to 30. Commented Sep 16, 2016 at 13:52

1 Answer 1

0

Issue might be due to server hanging, so check the server components health.

Otherwise you could be consuming all ephemeral ports which you can extend by tuning the tcp stacks.

As per Kiril S. answer, on windows it would be:

On Windows:

Follow this guide to check if ports might be an issue:

On Linux:

Set in sysctl.conf:

net.ipv4.ip_local_port_range=1025 65000

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.