[midPoint] DatabaseTable Resource Connector, too many opened connections

AXP axp.p at tiscali.it
Mon Mar 25 19:26:25 CET 2024


Hello,

In my project I have over than 500 Resources integrated by using 
DatabaseTable Resource Connector, all have its own database table in a 
only one Postgres database schema instance (not the same used by 
midpoint application).
I scheduled for each a reconciliation task once per day, delayed in a 
way that no more than two tasks runs in parallel.

I see that after some hours of uptime, the number of opened connections 
to postgres increase up to database limit, that is 100, and will no 
longer released, causing the following error at next task execution:

org.identityconnectors.framework.common.exceptions.ConnectorException: 
org.postgresql.util.PSQLException: FATAL: remaining connection slots are 
reserved for roles with the SUPERUSER attribute

How can I avoid this and force to release connection after task completion?

Notice that each resource have its own database configuration, that 
opens a new connection at reconciliation start, I suppose that by 
sharing a connection pool among all resources may resolve, but I don't 
find any documentation other than:

"It is not yet clear how to set up data sources for embedded Tomcat."
https://docs.evolveum.com/midpoint/devel/guides/environment/embedded-tomcat/

I'm using midpoint embedded in a docker container, that make use of 
tomcat embedded

Thanks in advance,
AXP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20240325/70b5347b/attachment.htm>


More information about the midPoint mailing list