SSPR local database grows and fills volume

  • 7017533
  • 25-Apr-2016
  • 31-Oct-2019

Environment

Self Service Password Reset
SSPR 3.x
SSPR 4.0

Situation

SSPR internal derby data base growing too large and filling up volume
How to control size of SSPR local database

Resolution

Do the following:

1. Limit what SSPR is logging by adjusting the settings in the SSPR Configuration editor under  Settings/  Logging   (such as the max age, log level and max number of events).  De-selecting "Enable LDAP Wire Trace" will dramatically reduce the amount of data that is logged.  

2. Export the LocalDB contents using SSPR Configuration Manager 

3. Stop SSPR (unload Tomcat)

4. Delete the contents of the local database.   In a Windows installation the local database is everything under LocalDB/derby-db.  In a Linux installation the local db is located in the LocalDB/xodus directory.  By default in an IDM installation this will be /opt/netiq/idm/apps/sspr/sspr_data/LocalDB/xodus.   Delete everything in the xodus or derby-dy directory.  In Linux environments this can be done with the command "rm -r LocalDB."   

 

5. Restart SSPR and the LocalDB will be re-created.   


Some have found that their local database grows so large that exporting it takes an excessive amount of time.  If downloading (exporting) the database is taking longer than you feel it should, consider the following alternate instructions. 

Alternate instructions for Linux environment:

1. Cancel the export of the SSPR-LocalDB that was started through configuration Manager.

2. Stop tomcat 

3. From the SSPR Server Console, make a backup of the database with the command "tar -cvzf sspr_bkp.tar.gz /app/tomcat/webapps/sspr" 

4. Use WinSCP or a similar utility to manually copy the backup from step 3 to another location.  (Directory locations are shown in step 4 above.)

5. Remove the LocalDB folder with the command "rm -r LocalDB"

6. Restart Tomcat.



Additional Information

With SSPR 4.1 and later, the SSPR local database will be self-regulating / self shrinking.

With previous versions of SSPR, once the derby-based localDB grows on disk, it will always claim that amount of disk space unless it is deleted and forced to start over. 

Usually the largest consumer of the local SSPR database is the eventlog DB, which is a copy of the debug stored in the localDB.  This is what is shown in the SSPR Configuration Manager log viewers.  Limiting the content and size of the LocalDB eventlog can have a big impact on how large the LocalDB will grow.