Postgres error when creating a database from source database template1

Description

PostgreSQL complains when creating a database from source database template1 with error

The 48 sessions corresponds to the connection min pool setting in etc/opennms-datasources.xml which is set to the following

Checking against the pg_stat_activity table, it shows exactly 48 idle connections.

The behavior is the same as described in . I suspect it’s not fully fixed.

Environment

PostgreSQL 15

Acceptance / Success Criteria

None

Activity

Show:

fooker September 21, 2023 at 3:03 PM

PR:

fooker September 21, 2023 at 12:09 PM
Edited

This is slightly different to , but was introduced by the same underlying change.

I can see multiple ways of solving this:

  • We can make the JDBC monitor/collector not use to connection pool and therefore free up the connections as fast as possible. This would increase the load on the target as every cycle will spawn a new connection

  • We can add another data-source which connects to the postgres database for our default monitoring config. This will multiply the pool resources even more.

  • We can make the opennms-admin data-source use the opennms database but then we have to tell people to create the database manually before installing OpenNMS

  • We can make the pool size configurable by data-source and add a new one for our default JDBC poller. This is .

Fixed

Details

Assignee

Reporter

HB Grooming Date

HB Backlog Status

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created September 19, 2023 at 6:29 PM
Updated January 9, 2024 at 4:41 PM
Resolved September 28, 2023 at 1:19 PM