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.

Environment

None

Activity

Peter Smythe 
December 3, 2021 at 10:37 AM

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Components

Priority

Created December 3, 2021 at 7:19 AM
Updated January 24, 2022 at 2:15 AM
Resolved December 20, 2021 at 1:47 PM