diff --git a/content/2015-11.md b/content/2015-11.md index 59a314cfc..b50357cda 100644 --- a/content/2015-11.md +++ b/content/2015-11.md @@ -66,3 +66,20 @@ location ~ /(themes|aspects/ReportingSuite|aspects/Statistics) { $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 93 ``` + +- I looked closer at the idle connections and saw that many have been idle for hours (current time on server is `2015-11-25T20:20:42+0000`): + +``` +$ psql -c 'SELECT * from pg_stat_activity;' | less -S +datid | datname | pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start | +-------+----------+-------+----------+----------+------------------+-------------+-----------------+-------------+-------------------------------+-------------------------------+--- +20951 | cgspace | 10966 | 18205 | cgspace | | 127.0.0.1 | | 37731 | 2015-11-25 13:13:02.837624+00 | | 20 +20951 | cgspace | 10967 | 18205 | cgspace | | 127.0.0.1 | | 37737 | 2015-11-25 13:13:03.069421+00 | | 20 +... +``` + +- There is a relevant Jira issue about this: https://jira.duraspace.org/browse/DS-1458 +- It seems there is some sense changing DSpace's default `db.maxidle` from unlimited (-1) to something like 8 (Tomcat default) or 10 (Confluence default) +- Change `db.maxidle` from -1 to 10, reduce `db.maxconnections` from 90 to 50, and restart postgres and tomcat7 +- Also redeploy DSpace Test with a clean sync of CGSpace and mirror these database settings there as well +- Also deploy the nginx fixes for the `try_files` location block as well as the expires block