JDBCConfig community module does not deal with stale connections to the database
Description
In our use case, the GeoServer is infrequently used overnight and some system (a firewall?) terminates the idle TCP connection between GeoServer and the JDBC Config database after about 2 hours.
In the morning, when the GeoServer tries to read the catalog via JDBCConfig/Store, it hangs, blocking any request, for about 15-16 minutes while the stale connection is tried.
We will shortly submit a PR that adds a test while idle flag and timer to the Apache Commons DBCP used by JDBCConfig. This solves our problem by periodically testing all the connections in the pool and recreating them if they are stale.
In our use case, the GeoServer is infrequently used overnight and some system (a firewall?) terminates the idle TCP connection between GeoServer and the JDBC Config database after about 2 hours.
In the morning, when the GeoServer tries to read the catalog via JDBCConfig/Store, it hangs, blocking any request, for about 15-16 minutes while the stale connection is tried.
We will shortly submit a PR that adds a test while idle flag and timer to the Apache Commons DBCP used by JDBCConfig. This solves our problem by periodically testing all the connections in the pool and recreating them if they are stale.