Subject | Re: How can I reduce the time it takes to consider a connection failed. |
---|---|
Author | agtilden |
Post date | 2010-03-30T22:10:43Z |
Hi Pavel,
Thanks for the quick reply.
Thanks for the quick reply.
--- In firebird-python@yahoogroups.com, Pavel Cisar <pcisar@...> wrote:
>
> agtilden napsal(a):
> > When trying to open a connection to a remote host that happens to be unreachable it takes almost 3 minutes for the following error to get raised. How can I shrink that time?
> >
> >
> > /lib/python2.6/site-packages/kinterbasdb/__init__.py", line 641, in __init__
> > b.dsn, b.dpb, b.dialect, timeout
> > kinterbasdb.OperationalError: (-902, 'isc_attach_database: \n Unable to complete network request to host "db.foo.com".\n Failed to establish a connection.\n Operation timed out')
>
> This is not Python related, just general Firebird question, so you may
> get better replies in firebird-support.
The reason I posted here was that I didn't know if there was a way to pass arguments through the python api that will make it way all the way to the isc_attach_database call on line 1038 of _kicore_connection.c
Anyway, I think that the problem
> is in DNS resolution time-out setting in your OS.
This isn't DNS related. The DNS lookup returns immediately. If the host is reachable I can attach instantly. If the host is unreachable, meaning DNS resolves fine, but can't ping, I see the long delay.
> best regards
> Pavel Cisar
> IBPhoenix
>