Subject Timeout connection to crashed db-server?
Author John vd Waeter
Hi all,

Is there a way to timeout a connection to a crashed db?

Situation: A firebirdserver somewhere on the internet serves both
Clients that attach via the internet to port 3050. Just to exchange
shortmessages. A clientsconnection usually never takes more then 8
seconds to connect, exchange some data and disconnect. These clients are
delphi-applications using IB-Objects components.

Some prefer to read data via a browser that connects Apache/PHP to the
same FB server, which is on the same host. This host runs linux, FB 1.5.

Once and awhile, firebird crashes. An attempt to connect takes 5 a 6
minutes before an error is raised. This is both for the
Apache/PHP-connection and for the vlients that connect direct via port
3050 over the internet. In the meantime, the application GUI freezes and
can only forcibly closed. It's quite difficult to convince people they
have to wait about 6 minutes to let the application handle the error in
a friendly way, like "sorry, connection not possible, please try later".

The servers log shows INET errors, select in packet_receive error 4 and
9, but these erros do not specify on which database the error occurred.

The D7-apps after 6 min. shows a 335544721 , unable to complete
network-request. Firebird.log on the clientside remains empty, no entry
for this event.

While the server was in this state, I tried a portscanner to see if port
3050 on the server would respond. It did. But attempts to connect to
database made the application freeze for again 5-6 minutes.

The reason for the servercrash is investigated by the servers sysop. But
I'd like to inform my app's users a bit sooner then 6 minutes that the
server has crashed...

This 5-6 minutes time, is it a server-side property or a clientside
property that happens to be the same using IBO and fbclient.dll or PHP?

If any, where can it be set?

thanks in advance,
John