On 2021-05-04 10:25, Jesper Andreasen wrote:
> Im writing here, because I don't know where else to turn. For
> starters, my knowledge of Firebird SQL is very limited.
>
> I have a customer who uses a large Perforex CNC machine, which
> connects to a Firebird SQL version 2.5.0.26074 database on a server on
> the same network. This has worked for years with no issues. The client
> machine is a Windows 7, where they start the program, that then
> connects to the FB SQL server itself.
First of all, you need to upgrade to at least Firebird 2.5.9. This
probably won't fix your problem itself, but several crashes and security
issues have been fixed since 2.5.0.
> Now we are moving their servers to a remote site, which is connected
> through a IPSec site to site vpn.
>
> I installed the same Firebird version on new server on remote site,
> moved the database there, and everything works flawless, exept for 1
> thing.
>
> After 30 minuttes of inactivity, the client program loses connection.
> So when they go to lunch for 30 minutes and come back, they have to
> close the program through Task manager. When they start it again it
> works with no issues until next time.
>
> Now of course I thought this must be something with the VPN, but I
> have troubleshooted a lot, tweaked a lot of things, also with the
> assistance of colleagues who are very capable of networking, but no
> change. Also, several other MS SQL databases, smb shares, printers,
> etc. etc. is run over the same vpn with no issues at all.
>
> Can there be some sort of timeout/inactivity setting in Firebird? And
> where, how do you change it? Any assistance is appreciated.
This sounds like a TCP inactivity timeout. This can be on all kinds of
levels. Some firewalls or network routers will forcibly close
connections without traffic for a long time. This isn't done by Firebird
itself, and normally Firebird uses SO_KEEPALIVE to prevent this, but
this has a default probe interval of 2 hours, so if your network
equipment drops connections after 30 minutes, then you need to reduce
this interval to a shorter period, or change your network configuration
to increase the TCP inactivity timeout.
For Windows, you can configure KeepAliveTime in the registry under
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\
in key KeepAliveTime (type DWORD). There might be other methods to
configure this.
If this doesn't work, you can also try to configure the
DummyPacketInterval in firebird.conf to a value less than 1800 (30
minutes).
Mark