Hi,

On 30/11/15 08:18, Alan Orth wrote:
[...]
Today, with db.maxconnections at 30 (I got superstitious and reverted to this default) and db.maxidle at 8 I had the following idle connections in PostgreSQL:

$ psql -c 'SELECT * from pg_stat_activity;' | grep dspace | grep -c idle
49

I'm starting to wonder if I should start drastically *increasing* the limits, or if I should start blaming DSpace for not closing connections properly...

For everyone's reference, there's a running Jira issue about this that has comments going back to DSpace 1.7: https://jira.duraspace.org/browse/DS-1458

I'm pretty sure there is something not right with regards to closing connections. I've long suspected that there is a bug in the db connection re-use logic somewhere but I haven't been able to find it.

If you're seeing worse behaviour in DSpace 5.x -- do you have Google Analytics enabled? As mentioned by Andrea Bollini in a different conversation here on dspace-tech the other day, the Google Analytics download recording appears to be holding on to the db connection until it has successfully reported the download: https://jira.duraspace.org/browse/DS-2904

I recently disabled the GA downloads event listener and I see a small drop in db connections in our monitoring, though only by about 2 connections. We have db.maxconnections set to 30 but generally have more than 30 connections. I don't know whether the limit also covers connections opened by cron jobs. I see around 25 idle connections with db.maxidle set to 8 (around 27 idle connections before disabling the GA downloads listener). Though we did make some changes to the memory allocation and applied the patch for https://jira.duraspace.org/browse/DS-2832 at the same time, which appears to have had quite a big impact on garbage collection frequency+duration. So the changes in db connections may not be from disabling the event listener after all.

cheers,
Andrea

-- 
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand
+64-7-837 9120


--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to