Skip to Content.
Sympa Menu

freetds - Re: [freetds] [PATCH] Configurable TCP KeepAlives

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Peter Deacon <peterd AT iea-software.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] [PATCH] Configurable TCP KeepAlives
  • Date: Tue, 12 Aug 2008 13:08:17 -0700 (Pacific Daylight Time)

On Mon, 11 Aug 2008, James K. Lowden wrote:

So, here's my threshold. Someone has to describe to me a situation on a
correctly configured network -- no borked firewall -- wherein a keepalive
timer will give the application better information than can be had in its

Experimentally playing with a packet sniffer the default for the MS driver seems to be to send TCP keep-alives at 30 sec intervals continually for the duration of the TCP session.

(Keep-Alive messages are similiar to send()ing 0 bytes)

A good experiment I guess would be to run WAITFOR DELAY '00:01:00' on a client system without a query timeout and pull the computers network cable. Try it with freetds vs the MS driver and see what the results are.

It was interesting setting up an experiment that worked..

If you stop the server the OS sends an ICMP hint that disconnects the client. If you pull the clients network cable the OS will ususally invalidate the connections itself (On windows anyway)

Ended up putting an MSSQL server on a vmware session and pausing the
session to simulate the problem.

The FreeTDS driver waits forever (Let it go for about 10 mins)
The MS driver times out after about a minute.

take care,
Peter




Archive powered by MHonArc 2.6.24.

Top of Page