ldproxy Version
4.7.1
Current Behavior
When running a ldproxy in combination with Postgis as a feature store, initially everything runs as expected and features are updated and retrieved as expected but after one or more days the database connection pool seems to gets starved and ldproxy cannot handle any request successfully any more. For each request it tries to get a database connection, but fails as can be seen in the log.
db.dbi - Connection is not available, request timed out after 30000ms (total=4, active=4, idle=0, waiting=2) [2a41bac9-edfd-4260-bb63-b7e69640cf99]
When inspecting the database connections from the Postgis side the connections seems to be reduced from 4 (which is the default maxconnections) to only one and even that connection is idling. Initially there were 4 connections.
So it looks like in certain conditions in ldproxy the connections are not returned to the pool.
Expected Behavior
as many active connections in ldproxy as there are connection in postgis for this client. so 4 (ldproxy) to 4 (Postgis) instead of 4 to 1
Steps to Reproduce
Current setup:
Ldproxy: version 4.7.1
provider configuration:
id: dbi
providerType: FEATURE
providerSubType: SQL
nativeCrs:
code: 4326
forceAxisOrder: LON_LAT
connectionInfo:
dialect: PGIS
database: ${PGIS_DB}
host: ${PGIS_HOST}
user: ${PGIS_USER}
password: ${PGIS_PASSWORD}
schemas:
- dbiv
datasetChanges:
mode: CRUD
types:
XXXXXXXX:
label: XXXXXXXX
description: XXXXXXXX
sourcePath: /XXXXXXXX
type: OBJECT
properties:
vid:
sourcePath: id{generated=false}
type: STRING
role: ID
....
service configuration:
id: dbi
serviceType: OGC_API
api:
- buildingBlock: CRS
enabled: true
additionalCrs:
- code: 3857
forceAxisOrder: NONE
- buildingBlock: FILTER
enabled: true
- buildingBlock: CRUD
enabled: true
collections:
XXXXXXXX:
id: vid
label: XXXXXXXX
description: XXXXXXXX
api:
- buildingBlock: QUERYABLES
included:
- vid
Postgis: version 3.5
Context:
we run multiple ldproxy's in parallel which many updates (mostly PATCHES and some CREATES) per seconds
Relevant log output
ldproxy DEBUG [2026-07-31 06:28:01,508] dbi - Processing request: PATCH /collections/XXXXXXXX/items/bad88034-dace-4a21-8ac3-fe1585fd2301 [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7]
ldproxy DEBUG [2026-07-31 06:28:01,508] dbi - accept-language null [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7]
ldproxy DEBUG [2026-07-31 06:28:01,508] dbi - content-language Optional[de] [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7]
ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - Filter: In{args=[Property{name=_ID_, nestedFilters={}, path=[_ID_]}, ArrayLiteral{value=[ScalarLiteral{value=bad88034-dace-4a21-8ac3-fe1585fd2301, type=class java.lang.String}], type=interface java.util.List}], op=in} [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7]
ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - FeatureQuery: FeatureQuery{type=XXXXXXXX, filters=[In{args=[Property{name=_ID_, nestedFilters={}, path=[_ID_]}, ArrayLiteral{value=[ScalarLiteral{value=bad88034-dace-4a21-8ac3-fe1585fd2301, type=class java.lang.String}], type=interface java.util.List}], op=in}], sdbiKeys=[], fields=[*], skipGeometry=false, forceSimpleFeatureGeometry=false, crs=EpsgCrs{code=4326, forceAxisOrder=LON_LAT}, maxAllowableOffset=0.0, geometryPrecision=[0, 0, 0], wgs84GeometryPrecision=[0, 0, 0], limit=0, offset=0, hitsOnly=false, skipPipelineSteps=[], returnsSingleFeature=true, extensions=[], schemaScope=RECEIVABLE} [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7]
ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - acceptable: [application/geo+json] [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7]
ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - provided: [text/html, application/vnd.policy.attributes, application/geo+json] [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7]
ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - selected: application/geo+json [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7]
ldproxy ERROR [2026-07-31 06:28:01,537] dbi - db.dbi - Connection is not available, request timed out after 30000ms (total=4, active=4, idle=0, waiting=2) [2a41bac9-edfd-4260-bb63-b7e69640cf99]
ldproxy DEBUG [2026-07-31 06:28:01,537] dbi - accept null [2a41bac9-edfd-4260-bb63-b7e69640cf99]
ldproxy DEBUG [2026-07-31 06:28:01,537] dbi - content-type Optional[ApiMediaType{type=application/problem+json, label=PROBLEM+JSON, parameter=json, fileExtension=json, qs=1000}] [2a41bac9-edfd-4260-bb63-b7e69640cf99]
ldproxy ERROR [2026-07-31 06:28:01,537] dbi - Server Error with ID 55eb285c929e80d5: java.sql.SQLTransientConnectionException: db.dbi - Connection is not available, request timed out after 30000ms (total=4, active=4, idle=0, waiting=2) [2a41bac9-edfd-4260-bb63-b7e69640cf99]
ldproxy DEBUG [2026-07-31 06:28:01,537] dbi - Sending response: 500 Internal Server Error [2a41bac9-edfd-4260-bb63-b7e69640cf99]
ldproxy Version
4.7.1
Current Behavior
When running a ldproxy in combination with Postgis as a feature store, initially everything runs as expected and features are updated and retrieved as expected but after one or more days the database connection pool seems to gets starved and ldproxy cannot handle any request successfully any more. For each request it tries to get a database connection, but fails as can be seen in the log.
When inspecting the database connections from the Postgis side the connections seems to be reduced from 4 (which is the default maxconnections) to only one and even that connection is idling. Initially there were 4 connections.
So it looks like in certain conditions in ldproxy the connections are not returned to the pool.
Expected Behavior
as many active connections in ldproxy as there are connection in postgis for this client. so 4 (ldproxy) to 4 (Postgis) instead of 4 to 1
Steps to Reproduce
Current setup:
Ldproxy: version 4.7.1
provider configuration:
service configuration:
Postgis: version 3.5
Context:
we run multiple ldproxy's in parallel which many updates (mostly PATCHES and some CREATES) per seconds
Relevant log output
ldproxy DEBUG [2026-07-31 06:28:01,508] dbi - Processing request: PATCH /collections/XXXXXXXX/items/bad88034-dace-4a21-8ac3-fe1585fd2301 [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7] ldproxy DEBUG [2026-07-31 06:28:01,508] dbi - accept-language null [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7] ldproxy DEBUG [2026-07-31 06:28:01,508] dbi - content-language Optional[de] [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7] ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - Filter: In{args=[Property{name=_ID_, nestedFilters={}, path=[_ID_]}, ArrayLiteral{value=[ScalarLiteral{value=bad88034-dace-4a21-8ac3-fe1585fd2301, type=class java.lang.String}], type=interface java.util.List}], op=in} [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7] ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - FeatureQuery: FeatureQuery{type=XXXXXXXX, filters=[In{args=[Property{name=_ID_, nestedFilters={}, path=[_ID_]}, ArrayLiteral{value=[ScalarLiteral{value=bad88034-dace-4a21-8ac3-fe1585fd2301, type=class java.lang.String}], type=interface java.util.List}], op=in}], sdbiKeys=[], fields=[*], skipGeometry=false, forceSimpleFeatureGeometry=false, crs=EpsgCrs{code=4326, forceAxisOrder=LON_LAT}, maxAllowableOffset=0.0, geometryPrecision=[0, 0, 0], wgs84GeometryPrecision=[0, 0, 0], limit=0, offset=0, hitsOnly=false, skipPipelineSteps=[], returnsSingleFeature=true, extensions=[], schemaScope=RECEIVABLE} [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7] ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - acceptable: [application/geo+json] [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7] ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - provided: [text/html, application/vnd.policy.attributes, application/geo+json] [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7] ldproxy DEBUG [2026-07-31 06:28:01,509] dbi - selected: application/geo+json [5cc920be-960c-423e-9cb8-4dd9e0d2c3a7] ldproxy ERROR [2026-07-31 06:28:01,537] dbi - db.dbi - Connection is not available, request timed out after 30000ms (total=4, active=4, idle=0, waiting=2) [2a41bac9-edfd-4260-bb63-b7e69640cf99] ldproxy DEBUG [2026-07-31 06:28:01,537] dbi - accept null [2a41bac9-edfd-4260-bb63-b7e69640cf99] ldproxy DEBUG [2026-07-31 06:28:01,537] dbi - content-type Optional[ApiMediaType{type=application/problem+json, label=PROBLEM+JSON, parameter=json, fileExtension=json, qs=1000}] [2a41bac9-edfd-4260-bb63-b7e69640cf99] ldproxy ERROR [2026-07-31 06:28:01,537] dbi - Server Error with ID 55eb285c929e80d5: java.sql.SQLTransientConnectionException: db.dbi - Connection is not available, request timed out after 30000ms (total=4, active=4, idle=0, waiting=2) [2a41bac9-edfd-4260-bb63-b7e69640cf99] ldproxy DEBUG [2026-07-31 06:28:01,537] dbi - Sending response: 500 Internal Server Error [2a41bac9-edfd-4260-bb63-b7e69640cf99]