Subject Disconnected User
Author Michael Vilhelmsen
Hi

I have asked before, but never really gotten an answer that could help me.
So here I go again.

Here in our house we have several DB servers and several Terminal
Servers.
Users connect from everywhere to our Terminal Server and run our
program which connect to a Firebird server.

Every once in a while (and this is in average every second day) a user
somehow disconnects unexpectally. It could be:

-
Turns off the PC at the remote site.
Our Terminal Server will then after 5 minuttes reset the session.

-
Instead of closing our program, and doing a logoff (which they should
do, but doesn't) they just close the Remote Session.
Our Terminal Server will then after 5 minutes reset the session.

-
They loose the internet connection (or we do).
Our Terminal Server will then after 5 minutes reset the session.

-
The program has an run time error.



What happens is, that the user stays connected to Firebird. Eventhough
the program isn't running anymore.
Usually Firebird detects this and removes the user connection.
But not here. I have seen a user connected for more than 72 hours
(when no others where connected to our terminal server).
Only solution is to stop and start the Firebird Server.


Every nigth at around 23.00 the last user disconnects.
And usually noone connects until 6.00 in the morning.
So at least 7 hours of inactivity, where Firebird should detect it.
But doesn't.


Our hardware/Software setup:

Terminal Servers.
OS:
Windows 2000, Windows 2003 SP1 or Windows 2003 R2 SP1

Either using Windows Terminal Server or Citrix as remote Connection.

They all results in hanging users.


DB Servers:
Windows 2000, Windows 2003 SP1 or Windows 2003 R2 SP1

All running Firebird 1.5.3 SS.

Some has been running Firebird 1.5.0, 1.5.1, 1.5.2 and have been
upgraded. Problem has been there in all those versions.


If I'm correct, then the standard settings in the OS regarding
KeepAliveTime will be around 2 hours.
This should result in Firebird releasing the disconnected user after
at least 2 hours.
But this doesn't happen.


All in all its annoying - We use the connected users to see if they
have reached a licens (regarding connections from our program).

As a side remark - I'm looking forward to when it will be posible to
"kill" a connection from Firebirds side. I think this is comming up in
Firebird 2.?? Should have been in Firebird 1 if you ak me ;-)

Regards
Michael