> On Firebird side connections are still alive and all pending transactions too.
In TCP terms, this is a "half-open" connection.
> 1. How can i check on the Firebird server side that connection is still alive by e.g. „ping” it.
I don't know if there is something like a ping. However, you can use
select * from mon$attachments
to see all attachments and you can use
delete from mon$attachments where mon$attachment_id = :attachment_id
to "cut off" a specific attachment.
> 2. After what time will Firebird close such lost connections itself?
This "Keepalive" time is defined in the TCP/IP stack of the operating system. In Windows, the default is 2 hours.
However, there is a setting in firebird.conf that you can change. And I would also recommend you change it. The setting is named:
DummyPacketInterval
When it is set to 0 (the default), then the OS default is used (2 hours). When you set it to 120, this means the Keepalive time is 120 seconds (2 minutes), which is a good value. Firebird will then send an out-of-band "keepalive" message to all clients that have been silent for the last 2 Minutes. Those clients who do not respond to the keepalive message will be detached.
Remember to restart the Firebird service after changing this setting so it can get effective.
HTH
Regards
Stefan
----- Ursprüngliche Nachricht / Original Message -----
Von/From: Karol Bieniaszewski <
livius...@poczta.onet.pl>
Gesendet/Date: 02.11.2021 13:23
An/To:
firebird...@googlegroups.com <
firebird...@googlegroups.com>
Betreff/Subject: [firebird-support] Auto close/ping "closed" connection
Hi
The case:
100 Users connect to database. And 5 of tchem are in one building.
There is power failture on that building. On Firebird side connections are still alive and all pending transactions too.
Such transactions can block other user activity (also same user which got power failture too when he is back now).
The questions:
1. How can i check on the Firebird server side that connection is still alive by e.g. „ping” it.
2. After what time will Firebird close such lost connections itself?
Regards,
Karol Bieniaszewski
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/firebird-support/4Hk8Fx0hGyz1tMB%40smtp.poczta.onet.pl.