LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reduce TCP wait time after connection breaks

Hi

 

I am running code on NI9651, based on RT Linux. (My application would like to connect to the server for prolonged intervals, and if it somehow gets disconnected, should be able to reconnect to the system as soon as possible.)

 

I try to connect to the system using TCP/IP, port 6123 which is working fine, even with multiple cilents at a time. Now when the server, (here 9651) resets all of a sudden, the connection breaks, without sending a formal close command to the client. Next time I run the code, I get error 60 at my TCP listen VI, which says that the port is in use, hence I cannot reconnect to system from my client. The server waits exactly for 60 seconds, after which I am able to reconnect to it from my client. 

 

From what I understand, if a formal close command is not sent and acknowledged, the server tries to reconnect to the old clients for 60 seconds before releasing the port again. For this reason, I added TCP_fin_timeout parameter = 10, TCP_tw_recycle = 1 and TCP_tw_reuse = 1 in the corresponding Linux file, at /etc/sysctl.conf. Even now, the server takes exactly 60 seconds to release the port. 

 

Is there any method by which I can reduce the TCP wait time in my Linux server side?

 

Thanks

Arya

 

 

0 Kudos
Message 1 of 1
(2,832 Views)