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 malformed #1534

Open
nicholasmparker opened this issue Sep 24, 2024 · 10 comments
Open

Database malformed #1534

nicholasmparker opened this issue Sep 24, 2024 · 10 comments

Comments

@nicholasmparker
Copy link

Started getting an issue last night:
Error: stepping, database disk image is malformed (11)

I tried vacuum - did not work. Any ideas? I can restore the DB to a backup if needed

@aaronwmorris
Copy link
Owner

The database might be toast, but try an integrity check.

sqlite3 /var/lib/indi-allsky/indi-allsky.sqlite "PRAGMA integrity_check;"

@nicholasmparker
Copy link
Author

nicholasmparker commented Sep 24, 2024 via email

@aaronwmorris
Copy link
Owner

The DB image import is probably not working currently, I need to update some of the patterns.

I have this page for rebuilding the database: https://github.com/aaronwmorris/indi-allsky/wiki/Rebuilding-the-database if you do not have a recent backup.

@aaronwmorris
Copy link
Owner

aaronwmorris commented Sep 25, 2024

I reviewed the DB image import functionality and I think it may work in its current state. Please feel free to try it.

Scratch that. I found something that needed to be updated. Merged #1538

@aaronwmorris
Copy link
Owner

Hopefully, the database rebuilt went smoothly. I am going to close this for now. Please re-open if there is anything else I can do for you.

@nicholasmparker
Copy link
Author

nicholasmparker commented Nov 4, 2024 via email

@aaronwmorris
Copy link
Owner

There were some issues at one point when I had the sqlite database pragma set to disable synchronous mode in a misguided attempt to resolve locked database problems. Setting synchronous=off made things faster, but it was very prone to database corruption if there is a power loss.

This has not been the case for a while and the standard setting now is synchronous=normal. Database corruption has been a very rare issue.

https://www.sqlite.org/pragma.html#pragma_synchronous

@nicholasmparker
Copy link
Author

nicholasmparker commented Nov 5, 2024 via email

@nicholasmparker
Copy link
Author

nicholasmparker commented Nov 10, 2024 via email

@aaronwmorris
Copy link
Owner

That is very strange. Did you have any strange error messages in the system log?

@aaronwmorris aaronwmorris reopened this Nov 10, 2024
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