Client software lose connection to Firebird SQL 2.5.0.26074

31 views
Skip to first unread message

Jesper Andreasen

unread,
May 4, 2021, 4:30:02 AM5/4/21
to firebird-support
Hi
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.

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.

Thanks in advance.

Jesper Andreasen

unread,
May 4, 2021, 4:35:01 AM5/4/21
to firebird-support
And by the way, the new server that runs the Firebird SQL is Windows Server 2019.

Mark Rotteveel

unread,
May 4, 2021, 5:01:47 AM5/4/21
to firebird...@googlegroups.com
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

Jesper Andreasen

unread,
May 4, 2021, 7:13:09 AM5/4/21
to firebird...@googlegroups.com
Thanks for your answer Mark, it's much appreciated.

I understand what you mean regarding the version. But I use this very specific version, because the manufacturer of the CNC machine and system, only "support it" if I use that specific version. It will probably just run better by upgrading it, but they won't help me with any issues on the CNC machine and other components if I do. They can't help with the this specific issue, because they just don't know enough about it (Or atleast not the Firebird part). They just use the same setup everytime, because that "worked the last time" for them.

I agree with what your saying, that it's probably not an issue with the Firebird part.

The regkey "KeepAliveTime" you mention doesn't exist on the server, from what I can read online, the default in Windows should be 2 hours if the key isn't there. Perhaps I will try creating the key manually later.

I monitored the session in the firewall, trying to watch what happenend to it when the error occurs, but today it didn't happen for some unknown reason. I will try again tomorrow and report back.

Thanks again.

Reply all
Reply to author
Forward
0 new messages