How to prevent increasing db connections?

cancel
Showing results for 
Search instead for 
Did you mean: 
koichinakata
Active Member

How to prevent increasing db connections?

Jump to solution

Hi experts,

My alfresco CE is 201706GA environment on amazon linux, m4.2xlarge, postgresql, solr4.

DB connections sometimes increase up to 250,  set db.pool.max as 250 in alfresco-global.properties.

I changed the value as 350, but I want to do more workaround.

I expect db.pool.abandoned.detect parameter is a workaround, but I'm not sure.

The parameter can be workaround to increase db connections up to max?

Regards,

Koichi.

1 Solution

Accepted Solutions
afaust
Master

Re: How to prevent increasing db connections?

Jump to solution

How many users do you have? How many active requests are sent to Alfresco per second / at the same time? Increases in DB connections are nothing bad / unexpected if the system is actually being used / active. Apart from the abandoned connections, you might want to check the eviction configuration if your goal is to decrease the number of DB connections quickly after a spike in usage that required the 250 connections. By default, only one connection will be checked for eviction from the pool per eviction run, connections have to be idle for 1800 seconds and eviction runs only occur every 600 seconds. By setting db.pool.evict.num.tests to a higher value, you allow more connections to be checked per run, while setting db.pool.evict.interval or db.pool.evict.idle.min to lower values (in millisecond resolution) will allow idle connections to be evicted quicker.

View solution in original post

2 Replies
afaust
Master

Re: How to prevent increasing db connections?

Jump to solution

How many users do you have? How many active requests are sent to Alfresco per second / at the same time? Increases in DB connections are nothing bad / unexpected if the system is actually being used / active. Apart from the abandoned connections, you might want to check the eviction configuration if your goal is to decrease the number of DB connections quickly after a spike in usage that required the 250 connections. By default, only one connection will be checked for eviction from the pool per eviction run, connections have to be idle for 1800 seconds and eviction runs only occur every 600 seconds. By setting db.pool.evict.num.tests to a higher value, you allow more connections to be checked per run, while setting db.pool.evict.interval or db.pool.evict.idle.min to lower values (in millisecond resolution) will allow idle connections to be evicted quicker.

koichinakata
Active Member

Re: How to prevent increasing db connections?

Jump to solution

My alfresco filed over 800 users, and over 50 logins at that time.

I set  both the parameter and increase db.pool.max.

db.pool.abandoned.detect=true
db.pool.evict.idle.min=90000
db.pool.evict.interval=300000
db.pool.evict.num.tests=5

content.transformer.default.timeoutMs=90000

Thank you for your quick help.