Subject Re: Another "connection forcibly closed by the remote host" problem
Author Adam
--- In, "Scott Moon" <scottmoon@...>
> We're stumped.
> We have two older client/server applications written in Delphi that
> use the BDE components to access Firebird databases. The Firebird
> database server runs on its own machine. The apps also use a common
> file ( - I said the apps were old) that is retrieved from
> a shared folder on that server. These apps have worked fine for years
> on Firebird 1.03 / Win2000 Server (and before that on Interbase
> 5.5). We've upgraded the server and software to Firebird 1.5 /
> Win2003 Virtual Server. The applications run fine while in use, but
> after one hour of idle time, subsequent use is halted and the
> following message is displayed:
> "General SQL error. Unable to complete network request to
> host "myHostName". Error writing to the connection. An existing
> connection was forcibly closed by the remote host."
> The user must close the program and reopen it to continue, it does
> not crash their system. We have worked with our network admin but
> cannot find any differences in settings between the old and new
> servers as far as the OS is concerned. There is no firewall in the
> way. There is a shared folder for the file, and we've
> tried the INTRBASE driver and the newest Firebird ODBC driver (where
> you specify a path to fbclient.dll), both still use the BDE, and the
> error still occurs with each. Any ideas would be greatly appreciated.
> Thanks,
> Scott


I will preface this advice by noting that there is no BDE version that
is considered stable for connection to any Firebird Server version. I
will have to assume that this BDE issue has nothing to do with your
problem, but obviously that may not be the case, it may well be your

The symptoms are consistent with the action when the server process
has been restarted. This may be because it was explicitly restarted or
perhaps it crashed and was restarted by FB Guardian. There are many
different causes for the engine to crash, mostly it is a result of it
panicing because things aren't as they should be. If it encounters
something it shouldn't, the server will favour a shutdown over
potentially corrupting the database. The usual culprits are poorly
coded, incorrectly defined or non threadsafe UDF calls, faulty
hardware, or corrupt database files. The place to start your
investigation would be Firebird.log to see why the server process
shutdown. Hopefully it was able to write the log file to disk before
it died.