Alfresco millions connection to PostGres

Showing results for 
Search instead for 
Did you mean: 
Member II

Alfresco millions connection to PostGres


We have an Alfresco community installed on an Unix server.
It was installed with the docker-compose.

We made a modification to this to move the PostGres docker  to an other machine (dedicated to postgres database).

Everything works.

Our IT service warned us that the Alfresco PostGres DB received a million of connections each hour.
21,177,491 one da, 27,189,102 the next day to be precise.

Is it normal ?

Our IT service is not very happy with that.


1 Reply

Re: Alfresco millions connection to PostGres

It depends on how you are using Alfresco and how it has been configured. E.g. if your Alfresco receives millions of calls per hour or runs significant internal (background) processes, and you have configured the connection pool to frequently evict idle connections (default: every 10 minutes connections that have been idle for 30 min are evicted), then this could be expected. Similarily, if connections are dropped because of network issues or becoming invalid in some way, they would be dropped and recreated if needed.

Relevant config properties that affect eviction:

# number of connections to test per eviction run - "-n" = fractional test of 1/n of all idle

Relevant config properties that affect connection validation:


The above default means that when connections are retrieved from the pool, they are first validated IF a query is set for validation (e.g. I have seen SELECT 1 FROM DUAL when using Oracle DB). If the connection is valid, it will be used, if not, it will be removed and a new one retrieved from the pool. If there are sufficient idle connections in the pool, one of them is likely to be used, otherwise a new connection may be created.


By default, Alfresco keeps ~10 idle connections. You could change the min/idle numbers to reduce the number of connections Alfresco evicts when the system is not receiving "enough" work to use them.