Difference between revisions of "SUNScholar/Optimisations/Database"
Jump to navigation
Jump to search
m (→Introduction) |
m (→Introduction) |
||
| Line 5: | Line 5: | ||
As our repository became more popular we noticed that the number database connections increased alarmingly. It is normal web application programming practice to release/sever database connections after a particular programming task on the database is done. | As our repository became more popular we noticed that the number database connections increased alarmingly. It is normal web application programming practice to release/sever database connections after a particular programming task on the database is done. | ||
| − | However with a large number of web site vistors in a short period of time the number database connections available soon ran out, so we adjusted DSpace and PostgreSQL to accommodate more visitors in a short period of time. | + | However with a large number of web site vistors in a short period of time the number database connections available soon ran out, so we adjusted DSpace and PostgreSQL to accommodate more visitors in a short period of time. ''The symptom is usually a blank screen.'' |
| + | ==Allow DSpace to make more DB connections== | ||
*Increase connection pool parameters | *Increase connection pool parameters | ||
The following db connection parameters are used: | The following db connection parameters are used: | ||
| Line 12: | Line 13: | ||
max_idle_connections = 400 | max_idle_connections = 400 | ||
These paremeters are set in the "build.properties" and "postgresql.conf" files. | These paremeters are set in the "build.properties" and "postgresql.conf" files. | ||
| + | ==Enable the PostgreSQL DB to accept more connections== | ||
Check the relevant wiki guide sections for more details. | Check the relevant wiki guide sections for more details. | ||
Revision as of 14:12, 26 June 2015
Back to Optimisations
Introduction
As our repository became more popular we noticed that the number database connections increased alarmingly. It is normal web application programming practice to release/sever database connections after a particular programming task on the database is done.
However with a large number of web site vistors in a short period of time the number database connections available soon ran out, so we adjusted DSpace and PostgreSQL to accommodate more visitors in a short period of time. The symptom is usually a blank screen.
Allow DSpace to make more DB connections
- Increase connection pool parameters
The following db connection parameters are used:
max_connections = 200 max_idle_connections = 400
These paremeters are set in the "build.properties" and "postgresql.conf" files.
Enable the PostgreSQL DB to accept more connections
Check the relevant wiki guide sections for more details.
- Fix "browse index" configuration to reduce the PostgreSQL database server query load.
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Browse_Indexes
- Vacumn the database regularly
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Daily_Admin