I’m seeing messages a couple of times a day from duplicati like those below since upgrading to 2.1.0.2. Anyone else seeing this?
SQLite error (17): statement aborts at 25: [PRAGMA optimize] database schema has changed
I’m seeing messages a couple of times a day from duplicati like those below since upgrading to 2.1.0.2. Anyone else seeing this?
SQLite error (17): statement aborts at 25: [PRAGMA optimize] database schema has changed
I have not seen this reported before, so not sure how to reproduce.
Based on this SO thread, it happens if the VACUUM
call has been made and then calling PRAGMA optimize
afterwards on the same connection.
I have made a commit that prevents this exact operation, but since I do not know exactly why it happens, I am not sure it fixes it.
Have you seen any pattern in the errors that could explain this?
I have duplicati installed on 5 hosts. 1 host has a full gui package, no messages there. The other 4 have the cli package and 3 of them see the message, but the 4th one has not. Although I now see that the 4th one hasn’t been upgraded yet, so that explains no messages there. I just upgraded that host now.
I do not have database encryption enabled on any of the hosts.
They are all Ubuntu 24.04 systems.
Here is some more context around the error messages
Jan 13 00:01:12 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on DeletedBlock(VolumeID)
Jan 13 00:01:12 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(VolumeID)
Jan 13 00:11:21 eggplant-int duplicati-server[3216132]: SQLite error (17): statement aborts at 25: [PRAGMA optimize] database schema has changed
Jan 13 02:00:00 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(BlocksetID)
Jan 13 02:00:00 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on G(BlocksetID)
Jan 13 02:02:36 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(BlocksetID)
Jan 13 02:02:36 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on G(BlocksetID)
Jan 13 02:02:50 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on DeletedBlock(VolumeID)
Jan 13 02:02:50 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(VolumeID)
Jan 13 02:03:14 eggplant-int duplicati-server[3216132]: SQLite error (17): statement aborts at 24: [PRAGMA optimize] database schema has changed
Jan 13 12:00:00 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(BlocksetID)
Jan 13 12:00:01 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on G(BlocksetID)
Jan 13 12:00:11 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(BlocksetID)
Jan 13 12:00:12 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on G(BlocksetID)
Jan 13 12:00:38 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on DeletedBlock(VolumeID)
Jan 13 12:00:38 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(VolumeID)
Jan 13 12:01:38 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(BlocksetID)
Jan 13 12:01:38 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on G(BlocksetID)
Jan 13 12:03:35 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on B(BlocksetID)
Jan 13 12:03:35 eggplant-int duplicati-server[3216132]: SQLite warning (284): automatic index on G(BlocksetID)
Given the times of the messages around the errors it appears that this occurs at the end of a backup. A quick scan shows that this appears to be true across all 3 hosts with the messages.
I have auto vacuum enabled on all hosts with an interval of 1 week.
However I’m seeing the message more than once a week for a given host.
The vacuum
call is done near the end of operations, and the PRAGMA optimize
is done just before closing the connection (as recommended by SQLite), so it makes sense that the error occurs at the end of the backup.
That seems to indicate that it is not vacuum
that is the only cause of this?
Weird thing is that this has not been reported anywhere else, but the SQLite library is bundled, so it should behave the same on all machines.
Is it regular x64 Ubuntu that you are running? Anything special on the machine with the GUI package?
This is x64 Ubuntu on all systems mentioned here. I do have duplicati on an arm64 system and realized that one does not appear to have these messages.
The x64 system that I upgraded yesterday is now showing the same messages.
As far as the system with the GUI package, I didn’t look close enough at the logs, it is showing the same behavior as well. So all of my systems running duplicati are consistently showing this message.
Any suggestions on gathering more information to help track this down?
Correction, my arm64 system is showing it as well. So the message shows up on arm64 and x64 systems.
Thanks for checking. I assume it happens fairly often then, just weird that it has not been reported elsewhere. I think I have fixed it in the source, so it will be part of the next release.
The fix is already in 2.1.0.107 if you are OK with running an experimental version.