DB Splite Error 11 issue

Hi everyone,

I have been searching through forums and found similar issues as mine but unfortunately none of the posted solutions have helped.

I previously only used Anki on my Mac and had no issues with the software. After downloading the application on iPad/iPhone I am consistently having problems with syncing specifically pertaining to the error code below :

DbError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some("database disk image is malformed"))”, kind: Other }

I have never had media appear on my phone or iPad. Recently thought it may be due to a media sync error and tried to force sync, which took a few hours. However, it did not work. For the first time a few days ago one image appeared on my phone from a deck, but no other images seem to sync.

I have tried updating anki on computer and mobile devices, delete the app and redownload, and even manually delete and redownload each deck. Media sync says complete. At this point I am at a loss. Please send help!

  1. Is “AnkiMobile Flashcards” the app you have installed?

  2. Are you seeing the error on AnkiMobile or Anki Desktop?

  3. Have you run a Preferences > Check Database on AnkiMobile (Preferences - AnkiMobile Manual) and/or a Tools > Check Database on Anki Desktop?

  1. A one-way sync only affects note/card/deck/database data, not your media. But there’s also no reason a one-way sync should be taking a few hours, unless your collection is huge. Is your collection huge?
  1. Media will take some time to sync when you first start using a new device, and it can take multiple tries to get it all synced – Media files may take time to sync - Frequently Asked Questions . Make sure your connection isn’t timing out, and your phone isn’t turning off.
  1. Where are you manually deleting and re-adding the decks? Are these decks you’ve newly added to your collection?

  2. Before all this, did you keep your Mac collection in sync with AnkiWeb – or are you just starting to sync now that you’re using multiple devices? How does your collection look on AnkiWeb? Is everything there from your Mac? Including the media?

  1. Yes this is the Ankimobile flashcards app (by Ankitects Pty Ltd)
  2. The error for Dbsplite is on both mac and devices with the app for anki mobile, both phone and tablet
  3. Yes, but just now when I checked database under preferences on the application it shows deleted 426 cards with duplicate template. On Anki desktop when I check database under tools it shows the following message :

"Missing files: ⁨14⁩

Unused files: ⁨18110⁩

The following files are referenced by cards, but were not found in the media folder: . . .

The following files were found in the media folder, but do not appear to be used on any cards:
. . . "
Followed by a long list of media that is not used by any cards but still listed on anki.

  1. The collection across all decks is just under 75,000 cards
  2. When I did a media sync from both devices on mobile (phone and tablet) it took about 1 hour but did not resolve the issue. The screen stayed on and it did not time out although the first 10,000 were quick and it became progressively slower after that.
  3. I tried manually deleting and readding them via export to my computer locally, but also tried to delete and redownload on the devices to the mobile app. Neither attempt corrected the issue of not being able to see media on the mobile app on either device (phone or tablet). Can still see images on anki desktop though.
  4. Before this I did keep it synced and had the account about 1.5 years before getting the app. On mac everything is there including media. When I export and share a deck to another computer, images appear there as well. Just not on my devices on anki mobile for some reason.

Additionally, when looking through the settings on desktop, under Preferences > Backups it states that “Media is not backed up. Please create a periodic backup of your Anki folder to be safe”.

Thank you so much for your reply. After reading through your questions, it seems to be an issue with syncing the app with desktop. Please let me know if there’s any other troubleshooting tips to help remedy this!

[I have to change number formats because the forum likes to renumber things otherwise!]

Thank you for those very detailed answers! What I think happened here was … nothing in particular :sweat_smile: – just a bit of dropped bytes, and wear and tear, and data conflict and crankiness. It won’t be hard to get everything cooking again, but it will take a little time and effort.

(3) That’s probably good and correcting something that wasn’t properly aligned in the database. But all of that will be overwritten when we’re done anyway.

(3) On Anki Desktop – it sounds like what you ran there was a Check Media – a good thing to do (and it revealed another issue, see below), but make sure you run a Check Database too.

(8) That is a normal aspect of the automatic backup system. Since Anki is making local backups for you many, many times each day, it only backs up the database – your notes/cards/decks/settings, etc. – not the collection.media folder. A compressed database backup is probably under 20 MB, while the media for a collection could be multiple GBs. But this is only talking about the local backups – unless you turn media syncing off, your media will be included in a sync to AnkiWeb.


It sounds like there are a couple things to do to smooth the way to getting things in sync.

(9) On Anki Desktop – let’s empty out that old media! Because Anki doesn’t keep a backup copy of your media, it’s very careful about deleting any of your media, even if it seems like you aren’t using it. As a result, you have 18K extra media files in your collection! This includes things you’ve attached and later decided you didn’t need, but also every media file of every deck you’ve ever imported to give it a spin, and later deleted. But here’s the thing – all of those 18K media files have been syncing to AnkiWeb for the past 1.5 years, and now they are trying to sync to your other devices!

  • In that Check Media window, there’s a “Delete Unused” button. Click that. [Don’t hesitate over this, because they only go as far as a “Trash” folder that doesn’t sync. If you find you did actually need them, we can get them right back!]
  • Now run a Check Database, we want to make sure everything is perfect.
  • Now force a one-way sync from Anki Desktop to AnkiWeb. We want your perfect database from here to be the one that AnkiWeb has.
  • Keep an eye on your media size at the bottom of the page on AnkiWeb – that should drop significantly. Your target is the size of your collection.media folder in your profile on your Mac. Don’t be afraid to sync a few more times if the number seems like it can still go down.
    image

(10) On your AnkiMobile installs, let’s clean them out completely. I know you already uninstalled, but the fresher they are the better, so you might do that again (uninstall, restart your phone, reinstall fresh). Or at least delete all of the notes and decks there and run Check Database again. You should also run Check Media there, and delete everything you find.

  • By now hopefully it seems like things have settled down between Desktop and Web. If it seems like they are still trading files, keep syncing there until they are done.
  • Choose just 1 of your iOS devices, setup syncing, and download-from-AnkiWeb. You should keep running sync again until Check Media on this device matches Check Media on your Mac.
  • Then you can do the same with your other iOS device.

(11) After this, please be strict about syncing – especially because you will have 3 devices going at the same time. You should only have “changes” (edits, additions, review history, etc.) happening on one device at a time. None of them can sync with each other directly, so you need to sync with AnkiWeb when you open the app AND when you close/leave the app, on every device, every time. That’s the only way to be sure you are always working with the freshest version of your database, and you don’t end up with data in conflict or overlapping.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.