Reputation: 117
I am using random variable to generate port numbers and used the variable in the port field of HTTP Sampler. I have tried to replace this with a counter variable also. Range is around 300 ports. I need to send traffic to 300 ports but when i send load I see that Jmeter is creating 10x connections for each port and continuosly connecting and disconnecting.
Connection received for HTTPSERVER E-16002-EP, Remote IP Address 10.13.194.52, Remote Port 46486
Disconnect received for HTTPSERVER E-16002-EP, Remote IP Address 10.13.194.52, Remote Port 59720, Bytes sent 3694, Bytes rcvd 5384, Msgs sent 2, Msgs rcvd 2, Up 0d 0h 1m 11.078s.
How do I make Jmeter reuse thread connections and not reconnect after the transaction is complete. Keep-alive is on and below settings are also set
httpclient4.idletimeout=70000
httpclient4.validate_after_inactivity=66000
httpclient4.time_to_live=70000
Upvotes: 0
Views: 1416
Reputation: 168157
If you want the full control of what's going on under the hood:
Upvotes: 1
Reputation: 1841
You can use the property httpclient.reset_state_on_thread_group_iteration
to reuse the http connection.
Set following in your {JMTER_HOME}/bin/user.properties
and restart the JMeter.
httpclient.reset_state_on_thread_group_iteration=false
By default the value is set to
httpclient.reset_state_on_thread_group_iteration=true
in the jmeter.properties
Upvotes: 2