Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database corrupt error when mutex table not empty #57

Open
mrkazoodle opened this issue Jul 29, 2019 · 1 comment
Open

database corrupt error when mutex table not empty #57

mrkazoodle opened this issue Jul 29, 2019 · 1 comment

Comments

@mrkazoodle
Copy link

mrkazoodle commented Jul 29, 2019

I recently got the error message by e-mail:
Subject: [Django][Bots severe error] Database is damaged
Body:
"!Bots database is locked!
Bots did an integrity check on the database, but database was not OK.
Manual action is needed!
Bots has stopped processing EDI files."

After opening the database successfully with dbeaver (so not actually damaged or corrupt), I compared the tables with the test environment's version. I found that the mutex table was not empty, and in the docs, I found that this is a table used for 'locking' the database so that only one instance can use it. After deleting it's entry and restarting the bots service, everything worked fine.

My question: please make the error a bit easier to understand:

  • the database was NOT damaged, in a sense that it would be corrupt and beyond repair,
  • ok, it said the database is locked, but please make this the subject of the e-mail, and
  • explain that the mutex table should be empty when there is no bots instance running

This, I experienced with version 3.2 of Bots on Ubuntu 16.04 LTS, after running for 7 months without any issues.

@djfurman
Copy link
Member

Thanks @mrkazoodle - I appreciate the detailed description of what the cause was.

The mutex table it designed ot achieve a mutex/semaphore pattern for the DB, but you're certainly correct that the error should point to that. I think it's an overly general catch. I'll see i fwe can get it down a little more specifically in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants