While doing a performance test for VS., after the VSM sends the response, the connections are being held for about 50 -60 seconds despite Connection: Close and Keep-Alive: Close values being returned in the response . How do you shorten the time the connection is being held ?
By default TCP ports hold connections for 60 secs.
All supported DevTest Environments
This is just the way TCP works on Linux systems
TCP port has a default 60 sec timeout value and it could be controlled by few system property settings.
Steps to follow:
1) Run the following command to find out what the current setting for your time_wait cleanup is:
2) If the above command returns 60, it is running the timeout clean up every 60 seconds. Chage the setting to 30 seconds.
To change it temporarily on your Unix machine, you will need to have Admin privileges and here is the command:
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
NOTE: IF THE LINUX MACHINE GETS RE-BOOTED, THE TIMEOUT SETTING WILL REVERT BACK TO 60
To change it permanently on your Unix machine, you will need to have Admin privileges and here are the steps:
1) edit /etc/sysctl.conf
2) add the following line:
We can just recommend the properties that might work on the customer’s machine; but it is entirely up to the customer if they are willing to makes those changes on their machine and are fully aware of the side effects of changing it.