Networking Forums

Networking Forums > Computer Networking > Linux Networking > Tweaking the TCP timeout question

Reply
Thread Tools Display Modes

Tweaking the TCP timeout question

 
 
Kaman
Guest
Posts: n/a

 
      07-23-2004, 07:55 PM
Hello,

I have a question related to the tweaking of TCP timeouts and retries.
Basically I have an application that connects to a remote server to
perform various operations. If the server dies however, it will
perform operations on a local database then sync up with the server
later. In linux, if the remote server is offline, the application
tries to reach the server for approximately 2 minutes before it gives
up and uses the local database. This of course makes the application
seem like it has hung.

I've done some research into tweaking tcp settings. I've found
various settings that I can tweak in the proc systems using sysctl.
I'm not sure which ones will work for this task. I'm currently
playing with:

tcp_orphan_retries
tcp_retries1
tcp_retries2

Does anyone know if I'm on the right track? Also I know these flags
alter the settings based on the retransmission timeout (RTO). Is
there anyway of tweaking the RTO? Or will tweaking one of the above
flags suffice?

Thanks in advance for your help
 
Reply With Quote
 
 
 
 
Phil Frisbie, Jr.
Guest
Posts: n/a

 
      07-23-2004, 10:35 PM
Kaman wrote:

> Hello,
>
> I have a question related to the tweaking of TCP timeouts and retries.
> Basically I have an application that connects to a remote server to
> perform various operations. If the server dies however, it will
> perform operations on a local database then sync up with the server
> later. In linux, if the remote server is offline, the application
> tries to reach the server for approximately 2 minutes before it gives
> up and uses the local database. This of course makes the application
> seem like it has hung.
>
> I've done some research into tweaking tcp settings. I've found
> various settings that I can tweak in the proc systems using sysctl.
> I'm not sure which ones will work for this task. I'm currently
> playing with:
>
> tcp_orphan_retries
> tcp_retries1
> tcp_retries2
>
> Does anyone know if I'm on the right track?


I think you are doing it the hard way...

The most common way to get around long connect times is to set the socket to
non-blocking, call connect(), then call select() on the socket with a reasonable
time-out, checking for errors and writability. If the select times out or shows
a socket error then you know the connect() has not completed and you can close
the socket. If select() returns that the socket is writable then the connect()
was successful.

> Also I know these flags
> alter the settings based on the retransmission timeout (RTO). Is
> there anyway of tweaking the RTO? Or will tweaking one of the above
> flags suffice?
>
> Thanks in advance for your help


--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure ARP-Request-Timeout? (NOT Cache-Timeout!) Mario lzteM Linux Networking 0 07-28-2008 09:41 AM
DFS UNC path tweaking Just Askin Windows Networking 1 07-13-2007 03:53 PM
Tweaking Sky Max connections ? Colin Wilson Broadband 0 04-05-2007 07:36 PM
Tweaking performance skyf Wireless Internet 4 04-09-2006 06:19 PM
tweaking Wondering Windows Networking 1 05-14-2005 11:50 AM



1 2 3 4 5 6 7 8 9 10 11