The eXist XMLDB can get corrupted after an unclean database shutdown. An unclean shutdown may be caused by power failures, OS reboots, or hanging processes that are subsequently killed.
A good improvement was seen after adding the recovery parameter, which configures the journaling and recovery of the database. With recovery enabled, it is much easier to recover an unclean database. For this to work correctly, all database operations must be logged to a journal file.
To add the recovery parameter, one must follow these steps:
a) make a backup for the ${MUSE_HOME}/xmldb/webapps/exist/WEB-INF/conf.xml file;
b) edit the ${MUSE_HOME}/xmldb/webapps/exist/WEB-INF/conf.xml file and just before the ""(no quotes) add the lines from below:
c) Restart Apache Embedded Tomcat server.