Subject Re: [firebird-support] Keeping database connection permanently open
Author Helen Borrie
At 05:21 PM 16/11/2006, you wrote:
>Hi,
>
>I've some applications, written in Delphi 7 using the IntraWeb (&
>TMSIntraWeb) components and running as an Apache dll under Windows 2000.
>
>I notice after some time of no activity, the database shuts down.

If there are no users connected then the database is effectively in a
shut-down state because no users are connected. :-) As soon as the
next user connects, it won't be in a shut-down state any more.

>Is there a way to configure FireBird (and/or Apache) never to shut
>down, even if there are no active connections?

Erm, No. The database server keeps *listening* for connection
requests. The server won't be off-line unless YOU stop it. It's how
a *server* works.

>Or must I rather in the in the process (IntraWeb server controller)
>try to keep the database connection alive by occasionally access one
>record in a table?

No. Nothing of the sort.

>In the firebird.conf file, I noteced the following comments:
>
># Normally, Firebird uses SO_KEEPALIVE socket option to keep track of
># active connections. If you do not like default 2-hour keepalive timeout
># then adjust your server OS settings appropriately. On UNIX-like OS's,
># modify contents of /proc/sys/net/ipv4/tcp_keepalive_*. On Windows,
># follow instrutions of this article:
># http://support.microsoft.com/default.aspx?kbid=140325
>
>Is this something to look at?

No. It's something to look at when you are troubleshooting a problem
of users who go away and leave an open connection idle. On some
Windows configurations, that live connection will time out too soon
and it will be a further two hours (by default) before the Firebird
server knows about it.

>(I use the installation defaults of Apache and FireBird 1.5)

You don't seem to have a problem, as far as I can see. Perhaps you
need to provide some information about the problem you are encountering.

./heLen