Skip to Content.
Sympa Menu

freetds - Re: [freetds] timeout

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: brian AT bruns.com
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] timeout
  • Date: Thu, 08 Jan 2004 18:07:53 -0800 (PST)

On Thu, 8 Jan 2004 20:48:45 -0500, "James K. Lowden"
wrote:

>
> On Thu, 08 Jan 2004, Kent Scott <kscott AT logicalsi.com>
> wrote:
> > I suspect axing the "timeout" member would
> > >be a good first step.
> ...
> > The connection timeout
> (connect_info->connect_timeout) seems to have the
> >
> > most implementation in place. There seems to be 3
> ways to set its value
> > - tds_parse_conf_section(), dbsetlogintime(), and
> tds_set_timeouts().
> > The first of those 3 is obvious - my guess from the
> other 2 was that
> > they were set up to be called either by the
> programmer in the code or by
> > any other language (such as PHP) during an
> initialization routine?
>
> tds_set_timeouts() is a self-labelled hack. IMHO we
> should write
> tds_config() -- based on ct_config() -- to manage
> connection options, and
> get the client libraries out of the business of
writing
> to the data
> structures. But that's not a necessary precondition
to
> making query
> timeouts possible.
>
> dbsetlogintime() is a login timeout, not a query
> timeout. If you will,
> it's managing a template value: when a new connection
> is opened, its login
> timeout value is taken from that set with
> dbsetlogintime(). This is a
> published db-lib function. It might be called by PHP,
> depending on how
> PHP was configured.
>
> tds_parse_conf_section() should IMHO also not write to
> the structure, but
> call my putative tds_config().
>
> > I did notice that PHP does attempt to call
> dbsettime()
> > except that it isn't implemented yet. The only part
> that was throwing me
> >
> > off was that tds_parse_conf_section() was looking
for
> and setting
> > timeout and not query_timeout.
>
> Right. I don't see much point in adding query_timeout
> to freetds.conf. I
> suppose we could, but why? The docs all say that the
> default is no
> timeout, so every application has to be written to set
> the timeout itself
> via the API.
>

Sybase supports timeouts in the interfaces file, so it
would be good if we supported it in the freetds.conf
file as well (remote servers over slow links may have
more relaxed timeouts for instance) and besides setting
it in the .conf file allows someone who is not the
author of the program to control the setting.

Brian




Archive powered by MHonArc 2.6.24.

Top of Page