Failed to connect database: Connection lost to database - Firebird and Delphi application

1

I have a server with over sixty client databases that currently operate with Firebird 3.0.3.32900 and an application in Delphi that is responsible for synchronizing logs from one end to the other. To exemplify, the application is responsible for forwarding data that is generated in the POS (sales, registrations ...) to the Rear.

It happens that some databases are not having a connection, and if I try to force a synchronization, the message "Failed to connect the database - Connection lost to database" is displayed. However, I can access the bank via IBExpert and via the back-end executable, even being able to save data. Even more strange, is that for the application to work, it is necessary to establish connection with the bank, which is possible without problems.

This message only happens in this sync feature. Anything else you do, there is no connection error with the bank.

I've been dealing with this problem for a week now. I did the Firebird reinstallation (I even migrated from 2.1.7 to 3.0.3) and even replaced the server with a new one. I also did gfix that solved the day, in the other the problem came back.

I searched the internet and saw something like Firebird does not handle many instances or that the port might be being used by another application.

Firebird has been installed in Classic mode and currently manages more than 180 concurrent connections. The sync application only uses a port that I define.

Would anyone have an idea of what might be happening? I hope it was clear, in case you need more details, take pity.

I will continue to search and test here.

As of now, it's fine. I'm waiting.

    
asked by anonymous 03.12.2018 / 15:50

1 answer

0

The Classic server creates a separate process for each client connection, whereas Super Server creates only one process and uses threads and a shared cache.

Momentarily, you can change Firebird to work on "Super Server" as it is more efficient to work with large amounts of connections, and change Firebird's "conf" to work better with your hardware.

If you do not have so much knowledge in conf, use one of the IBSurgeon

Ideally, you should stop connecting remotely and create a 3-tier application (client, middleware, database).

    
28.12.2018 / 13:12