Subject 'Unable to complete network request' problem
Author natalvc
Hello,

We've been experiencing a problem with the JBird driver in certain
conditions. We're running Tomcat 4, the latest version of the Classic
Firebird Server and the newest release candidate of JBird. We use the
built-in connection pooling mechanism via the FBWrappingDataSource
class which we access from all our servlets via a static variable
(the first servlet to access it, creates it).

During 'normal' operation, i.e. fairly frequent calls to our servlets
and thus use of the DB connections, everything goes very smoothly. If
we leave the servlets running for a few hours, however, without calls
to them, and then make a call to one of them, we get the following
exception:


Problem getting connection: Unable to complete network request to
host "127.0.0.1".
java.sql.SQLException: Problem getting connection: Unable to complete
network request to host "127.0.0.1".
at org.firebirdsql.jdbc.FBDataSource.getConnection
(FBDataSource.java:107)
at org.firebirdsql.jdbc.FBSimpleDataSource.getConnection
(FBSimpleDataSource.java:251)


The Interbase server is still running since if we restart the Tomcat
server (and thus create a new FBWrappingDataSource class), everything
works again. We run several other servlets on the Tomcat server using
the InterClient driver and they keep functioning, even after very
long periods of idle time. So it doesn't seem to come down to a
network problem either.

Now, we're not 100% sure that the problem is a result of long periods
of database inactivity but we do notice the exception everytime the
FBWrappingDataSource was active all night without calls to the
database. During day-time testing (with frequent calls) we haven't
noticed the problem. We've even stress tested our application with
thousands of HTTP calls and everything keeps working as intended.

Any ideas what could be causing this? Perhaps the FBManagedConnection
bug recently mentioned on this list?

Greetings,
Natal Vande Casteele