Skip to Content.
Sympa Menu

freetds - Re: [freetds] Keepalives (was Sybase disconnect after idle)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Keepalives (was Sybase disconnect after idle)
  • Date: Thu, 23 Feb 2012 20:41:38 +0100

2012/2/23 Michelle Dupuis <mdupuis AT ocg.ca>:
> It looks like the problem is the OS or a firewall is terminating the
> connection after lengthy idle periods on the client.
>
> A google search turned up a patch to freetds with "keepalive" settings
> (back in 2008) but I haven't seen mention of it since.
>
> Did this patch make it into freetds 0.91 ?  If so, can I just set
> "keepalive interval 600" in my freetds.conf ?
>
> Thanks!

>From my code KEEPALIVE is set in 0.91 and 0.92 by these rows in src/tds/net.c

#ifdef SO_KEEPALIVE
len = 1;
setsockopt(tds->s, SOL_SOCKET, SO_KEEPALIVE, (const void *)
&len, sizeof(len));
#endif

perhaps for some reasons SO_KEEPALIVE is not defined ??

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page