Difference between revisions of "SUNScholar/Optimisations/Database"

From Libopedia
Jump to navigation Jump to search
Line 15: Line 15:
  
 
==Enable the PostgreSQL DB to accept more connections==
 
==Enable the PostgreSQL DB to accept more connections==
 
+
Now that DSpace wants to make more connections, you must tell the PostgreSQL DB to accept more connections.
  
 
==Miscellaneous DB optimisations==
 
==Miscellaneous DB optimisations==

Revision as of 14:33, 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

To do this you will need to modify the DSpace configuration to make more connections.

  1. Go to: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_DSpace/S04
  2. Search the relevant build.properties file for db.maxconnections = 50 change the allowed number of connections to 150.
  3. And then rebuild Dspace.

150 connections should be a good start to tuning DSpace for DB connections, you can adjust as needed, remember though that the PostgreSQL DB can only take so many connections and that more DB connections requires more server resources!

Enable the PostgreSQL DB to accept more connections

Now that DSpace wants to make more connections, you must tell the PostgreSQL DB to accept more connections.

Miscellaneous DB optimisations

  • 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