This content has been marked as final. Show 1 reply
There should have been some additional error messages along with the "out of memory" error (or likely the OOME exception). You can enhance the error reporting, in order to find out exactly what resources needed by BDB XML have been exhausted (locking, logging, memory pool, mutex, or transaction resources), by using one of the EnvironmentConfig.setErrorStream() or EnvironmentConfig.setErrorHandler() methods.
Indeed, db_recover should be able to clean the environment and allow it to be restarted without errors. Though, the "Database handles still open at environment close" with BDB XML is usually caused by not properly closing transaction handles and database or container handles before closing the environment, or by not calling delete() or close() on the BDB XML handles (XmlQueryExpression, XmlStatistics, XmlResult, XmlContainer, XmlManager etc). The error does not imply that the databases or containers mentioned in the errors are corrupted or inconsistent. Here are just a few of the threads where this error was discussed:
why Database handles still open at environment close?
Error: 'Database handles still open at environment close'
BDB XML: Database handles still open at environment close message
The best approach would be to inspect the application's code and implement the above suggestions. If this is not possible, then you should use db_recover as before.