Could be also some periodic maintenances - check them. If anything tries to write (not sure about read) anything to the database during the rebuilding, it crashes the database.
I would like to know what BackgroundHALShouldPause does, and how to use it. While it's listed in the HAL Primitives report, it is not used in source code and it doesn't appear in the LMS HAL...