Subject Re: [firebird-support] "Hanging connections" on FB/1.5 SS
Author Aage Johansen
Helen Borrie wrote:
> At 10:19 PM 4/10/2005 +0200, [I] wrote:
>>This is Fb/1.5.2 SS running on Win2000 server (WI-V6.3.0.4306 Firebird
>>1.5). The application is developed with Delphi/6 and IBO/4.2. The size
>>of the db is approx. 1GB.
>>We have observed connections to the database that stay there long after the
>>users have disconnected
>> ...
> ...

> System Key:
> [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters]
> Value Name: KeepAliveTime, KeepAliveInterval
> Data Type: REG_DWORD (DWORD Value)

I'll check this out.

I think all users are using the same (one and only) application, but I
cannot say whether someone has shared their username/password with others.
The connections stay on for hours (if not days), it seems. Quite strange.

> For the cases where the LAN connections seem slow to detach, you could put
> a timer on the AfterDisconnect event that tests the Connected property ...

The progam writes to a logfile, I'll check further. Maybe write some
"disconnect info".

>>Moreover, using gfix the shutdown the database seemed to not release all
>>connections - e.g. it was not possible to rename the database file.
> Shutdown doesn't close the database file, it prevents new connections
> and/or new transactions, depending on how you specified the shutdown. The
> database won't go into a shutdown state if anything is still happening when
> the specified timeout has elapsed. So, even if you tell all the users to
> disconnect, it could well be that some connections are still winding down
> by the time the timeout period ends.

When IB_SQL just shows one instance of SYSDBA, and then SYSDBA disconnects,
I would think that in just a few moments the database file would be free
for renaming (or whatever). It wasn't (according to reports, I haven't had
a chance to check for myself. Yet).

>>IIRC, this started to happen after a total "power down" where the UPS
>>didn't close down the server gracefully. Before that, for quite some time,
>>we observed no traces of left-over connections.
> Interesting...

Probably a false hint. Nevertheless...

Aage J.