Bug 63535

Summary: More than 50000 connects were created when I run test with 100 threads
Product: JMeter Reporter: aliyabo <15527206908>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED DUPLICATE    
Severity: normal CC: p.mouawad
Priority: P2 Keywords: FixedInTrunk
Version: 5.1.1   
Target Milestone: JMETER_5.2   
Hardware: PC   
OS: All   

Description aliyabo 2019-07-02 03:33:58 UTC
More than 50000 connects were created when I run test with 100 threads, and it used up all ports of my machine. However, only 200 connects were created when using jmeter 3.2.
Comment 1 Felix Schumacher 2019-07-02 06:23:19 UTC
This report lacks a lot of information and can't be solved without more details:

* Please supply a simple test plan that we can run to reproduce the issue.
* Give more information on the used elements and the kind of server you are talking to
* Which version of JMeter, Java, OS, ... are involved

Apart from this, it is always a good idea to use the mailing list first, in case this is a known issue or something easily avoidable.
Comment 2 aliyabo 2019-07-03 06:01:30 UTC
I have a script with 100 threads which upon executing for 1 minute with keep-alive enabled for all requests, and following are my observations:

1. httpclient.reset_state_on_thread_group_iteration=true 
  More than 50000 connects were created,  and it used up all ports of my machine. Do you have any idea to avoid it?  With the default value 'true', What considerations are based on?
Comment 3 Philippe Mouawad 2019-07-07 13:00:24 UTC
By default:

httpclient.reset_state_on_thread_group_iteration=true 

Which means a thread iteration correspond to a new user which is why SSL state is reset for example.

In upcoming version of JMeter, you'll have more control in a clearer way on this , have a look at:

- Bug 62861

You can already use nightly build to test this new feature:

- https://ci.apache.org/projects/jmeter/nightlies/

*** This bug has been marked as a duplicate of bug 62861 ***