Darktable crash - database corrupted

getting this error. I have had several crashes doing normal operations on pics. I had to spend hours rebuilding database after trying to rebuild from snapshots which also gave same error. I also had to update all my backups.
I dont want this to happen again. What is the problem, what should I have done to restore, and what do I do next time? I have had two crashes after the database rebuild. I am concerned that I will get this error again. Error:


Any chance of a failing disk? If darktable was running previously, and there were no problems with the DB, how is it possible, that the snapshots (which are copies of the DB which had no problems at the time) are also reported as corrupted?

Thanks Kofa: The SSD disk appears to be healthy