Subject Re: [firebird-support] Re: User lockouts
Author Yves Glodt
Jason Dodson wrote:
> Actually, when I find my users do this, and subsequently can not get a server connection, it is because whatever caused the application to hang (slow
> running query or similar) is still running, taking up 100% of the processor time. Hence frozen app and no connecting goodness.

We have (had) the same problem: Slow query->user thinks app is
hanging->user kills app in task manager->1 firebird process stays on the
server using 100%.

One thing that can help you finding the PID of the locked process is,
create an UDF you call, when the user connects, that returns you the PID
of the firebird process which the user is connected to (applies to
classic server only), then, you need a daemon that check if the user is
still logged in your application, and if he's not, and kill the locked
process (whose PID is known from the UDF).

Or, wait for Firebird 2 which will react better in this special case it

> Jason
> Adam wrote:
>>--- In, "Robin Cumming"
>><rgc4000@y...> wrote:
>>>We are using Firebird 1.5x on a Win2003 server with a Delphi 5 based
>>>application. We are experiencing hangs in the application (no doubt
>>>due to bad code), the user then ends the process/application with task
>>>manager, and restarts the application. However Firebird will not allow
>>>the user to re-connect for about 20 minutes. The program uses IBX
>>>components to test whether the user is connected to FB, and FB reports
>>>the user is still connected even after disconnecting and re-starting,
>>>thus the 20 minute wait.
>>Are you suggesting that Firebird thinks that your user is still active
>>for around 20 minutes after the freeze?
>>Firebird doesn't prevent a connection being made, so I am guessing it
>>is your application logic that does this. It could be a TCP Timeout of
>>some sort that Firebird is happy to wait 20 minutes without a keep
>>alive packet before deciding the client is gone.
>>>Any suggestions on the cause of the problem and what we can do to fix ?
>> -- do whatever in here
>> con.close