[freetds] timeout

Kent Scott kscott at logicalsi.com
Thu Jan 8 10:33:32 EST 2004


Was wondering if someone could give me some direction in looking into how 
the timeout on queries work.  Quick background info - running slackware 
9.1, freetds 0.61.2, and php 4.3.3.

My biggest problem stems from the fact that if a connection is made and 
then lost while trying to run queries (in php) I seem to hang indefinitely 
until the connection comes back. It seems that the function in tds that 
ultimately gets called is goodread(). It looks at tds->timeout to go in to 
some code to be able to return. tds->timeout seems to be set in tds_connect 
by looking at the connect_timeout variable. If connect_timeout is set then 
it assigns connect_info->query_timeout. query_timeout is set in 
tds_set_timeouts().  This function does not seem to be called anywhere 
internally. Here is where I am a little confused, there seems to be a 
connect_info->timeout variable that is set by parsing the config file 
(timeout = 5). What is supposed to be the difference between query_timeout 
and timeout in connect_info? Thanks in advance!

Kent



More information about the FreeTDS mailing list