Constant Errors Uploading / Sync

Hi,

I have been experiencing a lot of issues when trying to upload my deck to AnkiWeb after adding notes. I’ve tried everything, including deleting decks and even after deleting some large decks, I still receive the following error message:

“Your collection file is too large to send to AnkiWeb. You can reduce its size by removing any unwanted decks (optionally exporting them first), and then using Check Database to shrink the file size down. (⁨4909297664 > 314572800⁩)”

I tried using the “Check Database” function but then the sync turns red on my windows PC because it now says: “There is a conflict between decks on this device and AnkiWeb”.

However, my macbook can sync (though it syncs to before I had added notes). When I try to use the upload option, after using Check Database, it gives me the same “Collection size is to large” error above. When I click download instead, I get this new error:

HttpError { code 400, context “missing original size”, source None }

Before I used to restart my windows PC, and the problem would fix itself, but I would have to constantly sync after adding notes to about 10 cards, whether its on my macbook and windows PC. And if I add to much at a time, I get the “Your collection file is too large to send to AnkiWeb" error. Now my Widows PC anki just won’t work after restarting my PC.

I don’t know how to:

  1. Fix my Windows PC sync issues, even though my Macbook can sync (though I will lose the 10-20 cards I added notes to)

  2. Fix the issue of only being able to add notes to 10 - 20 cards, before I get the “Your collection file is too large to send to AnkiWeb" syncing error. Before today, I could add as much as I want, so long as I sync every few cards to prevent these errors form popping up.

  3. Fix the issue of not being able to upload / download in case this happens again.

  4. How do I fix my collection size to not have this issue? Even though I deleted many big decks on my windows PC, it still gives me the same errors, and I genuinely don’t know what’s wrong or what exactly I need to delete.

I am a medical student, and use Ankihub with the AnKingV12 med deck and a few others as well. I do add pictures to my notes on the AnKingV12 deck and color code my notes via text colors. I don’t really know whats the best way to fix this and I don’t really understand what is making my anki collection so large, even after deleting so many decks.

1 Like

I love numbered issues, so it pains me not to follow your numbering. But I really think root of the problem lies in 2 issues, and if those can be fixed, everything else might fall into place (or at least be exceedingly easier to fix).


A. I don’t think you’re syncing all of your installs with the same AnkiWeb account.

I’m looking at the AnkiWeb account associated with this email address, and I see that a Windows install has contacted AnkiWeb for sync today – but I don’t see a MacOS install. [Do you also have a phone install that you haven’t synced recently?]

Is it possible that your MacOS install is syncing with a different AnkiWeb account? Or that it is syncing with AnkiHub, and not with AnkiWeb at all? Either one of those would account for why you’re seeing such a difference between Windows and Mac.

I got updated information about this, so I don’t think this is an issue anymore.


B. Your collection is really big – at least in this AnkiWeb account. [Perhaps the numbers I’m seeing aren’t accurate, but it also looks like your database has at least quadrupled in size in the past few weeks.]

Will you check a couple things? These should be close to the same –

  • On Windows, go to your Anki2 data folder (%APPDATA%\Anki2 is the default location), go into your profile folder, and check the size of your collection.anki2 database file, and your collection.media folder.
  • On AnkiWeb – https://ankiweb.net/decks – scroll to the bottom and check the Collection and Media sizes.
  • [Edited to add] On Mac, go to your Anki2 data folder (see default location), go into your profile folder, and check the size of your collection.anki2 database file, and your collection.media folder.

The size of your media likely isn’t the reason you can’t sync, but in all of this deleting decks, if you haven’t been deleting the media as well – it’s not helping. Have you run Check Media and deleted unused media? [It’s totally safe to do this on desktop, because it’s first moving it only as far a trash file to take it out of the sync cycle. You can get it back if you need to.] Try that on Windows first (but it’s probably good to compare to the Check Media result on Mac too).

The collection-size is the problem, so let’s start with what the difference is between Windows and AnkiWeb and Mac.

Hi Danika!

Thank you so much for your reply! It genuinely means a lot getting your help to resolve this issue. I’d like to apologize for this long thread, and this might be way more info that you asked, but I provided everything in case with the exact steps I did in order.

On my Windows PC, these are the sizes of each folder:

    1. backups
      • Size: 151 GB (163,174,834,484 bytes)
      • Size on disk: 151 GB (163,175,006,208 bytes)
      • Contains: 73 Files, 0 Folders
    1. collection.media
      • Size: 20.7 GB (22,229,812,034 bytes)
      • Size on disk: 20.8 GB (22,435,721,216 bytes)
      • Contains: 100,989 Files, 0 Folders
    1. media.trash
      • Size: 1.49 GB (1,601,361,972 bytes)
      • Size on disk: 1.49 GB (1,601,361,972 bytes)
      • Contains: 1.49 GB (1,601,361,972 bytes)
    1. collection.anki2
      • Size: 4.59 GB (4,930,863,104 bytes)
      • Size on disk: 4.59 GB (4,930,863,104 bytes)
    1. collection.anki2-wal
      • Size: 0 bytes
      • Size on disk: 0 bytes
    1. collection.media.db2
      • Size: collection.media.db2
      • Size on disk: collection.media.db2

On my Macbook Pro, these are the sizes of each folder:

    1. backups
      • Size: 153.34 GB
      • Size on disk: 153.57 GB (153,336,633,188 bytes)
      • Contains: 74 items
    1. collection.media
      • Size: 22.21 GB
      • Size on disk: 22.44 GB (22,209,230,687 bytes)
      • Contains: 100,968 items
    1. media.trash
      • Size: Zero KB
      • Size on disk: Zero bytes (Zero bytes)
      • Contains: 1 item
    1. collection.anki2
      • Size: 4.92 GB
      • Size on disk: 4.93 GB (4,922,040,320 bytes)
    1. collection.anki2-wal
      • Size: Zero KB
      • Size on disk: Zero bytes (Zero bytes)
    1. collection.media.db2
      • Size: 13.2 MB
      • Size on disk:
      • Contains: 13.7 MB (13,225,984 bytes)

On my Ankiweb.net/decks account, these are the file sizes:

    1. Collection: 608.97MB
    1. Media: 21180.37MB

I ran “Check Media” on my Windows PC, and this is what it showed:

    1. Trash folder: ⁨⁨21245⁩ files, ⁨1527.18⁩MB⁩
    1. Missing files: ⁨14274⁩
    1. Unused files: ⁨718⁩
    1. Extracted images: ⁨7349⁩

I then deleted the 718 unused files on my Windows PC, and ran “Check Media” again, and got the following:

    1. Trash folder: ⁨⁨21963⁩ files, ⁨1614.93⁩MB⁩
    1. Missing files: ⁨14274⁩
    1. Unused files: ⁨0⁩

I ran “Check Media” on my Macbook Pro, and this is what it showed:

    1. Missing files: ⁨14331⁩
    1. Unused files: ⁨736⁩
    1. Extracted images: ⁨7355⁩

I then deleted the 736 unused files on my Macbook pro, and ran “Check Media” again, and got the following:

  • 1 .Trash folder: ⁨⁨736⁩ files, ⁨90.69⁩MB⁩
    1. Missing files: ⁨14274⁩
    1. Unused files: ⁨0⁩

On my Macbook, I clicked Sync and it completed the Sync successfully. On my PC, I pressed the Red Sync button, selected “Download from AnkiWeb” but still get this error: HttpError { code: 400, context: “missing original size”, source: None }

I’m not sure if this is all connected, but lately, Anki has been getting slower on both my devices. On my Windows PC, switching from a specific deck to the main deck page causes the program to stop responding for a few seconds before it recovers. When I’m in the browser tab and click between cards, the “Processing” pop-up frequently appears, making it slower to load the selected card. I also see frequent “Processing” and “Creating backup” pop-ups when adding notes or images to cards on both my Windows PC and MacBook, regardless of which I’m using.

Before these issues began on my PC, I synced Anki on both devices. First, I synced my PC, and then I synced my MacBook to get the updated notes from my PC. Later last night, I copied these notes into other cards on my MacBook to ensure I didn’t lose anything and now my MacBook has the version I want and I am able to sync.

Although my MacBook can still sync normally, I’m cautious about using the “On next sync, force changes in one direction” option. When I’ve tried this before on either my MacBook or PC, I believed I received a “too large to upload to AnkiWeb” error, and the Sync button turned red, which I want to avoid since my MacBook can at least still sync for now.

Previously, I could mass edit large numbers of cards without issues of slow response times or needing to frequently sync because of the size uploading error, but something has changed in the past 1–months. How can I fix Anki on my PC, reduce the file size of my most updated MacBook Anki collection, and safely resume syncing after adding notes or images to cards without risk of these issues?

Additionally, what is causing me to no longer have the ability to force an upload to AnkiWeb (on both PC or Macbook)? Regardless of the device, when I attempted trying this before, I would receive an the error associated with uploading a large collection even if I deleted many decks that I uploaded from AnkiHub. When this happened on my Macbook, I had lost all progress that entire day after completing my card load and subsequently adding notes (I didn’t sync after completing my cards). Because I couldn’t force an upload to Ankiweb, I had to download from my last sync and since then, I have been syncing as frequently as possible to make sure I don’t lose any progress in case this happened again but now its becoming very time consuming and burdensome.

I forgot to mention this, but right after I had these issues (and before your response), I tried to load a previous backup stored on my PC, but it gave me this error that I saved:

Anki 24.11 (87ccd24e) (ao)

Python 3.9.18 Qt 6.6.2 PyQt 6.6.1

Platform: Windows-10-10.0.19045

Traceback (most recent call last):

File “aqt.taskman”, line 144, in _on_closures_pending

File “aqt.taskman”, line 88, in

File “aqt.mediacheck”, line 235, in on_done

File “concurrent.futures._base”, line 439, in result

File “concurrent.futures._base”, line 391, in __get_result

File “concurrent.futures.thread”, line 58, in run

File “aqt.mediacheck”, line 229, in empty_trash

File “anki.media”, line 70, in empty_trash

File “anki._backend_generated”, line 2032, in empty_trash

File “anki._backend”, line 172, in _run_command

anki.errors.BackendIOError: Access is denied. (os error 5)

Error in sys.excepthook:

Traceback (most recent call last):

Original exception was:

Traceback (most recent call last):

===Add-ons (active)===

(add-on provided name [Add-on folder, installed at, version, is config changed])

AMBOSS add-on [‘0amboss_addon’, 2024-08-05T10:24, ‘None’, ‘’]

Advanced Review Bottom Bar [‘1136455830’, 2024-08-22T07:04, ‘None’, ‘’]

Anki Simulator [‘817108664’, 2023-11-06T12:26, ‘None’, ‘’]

AnkiHub [‘1322529746’, 2024-11-12T12:38, ‘None’, ‘’]

BetterSearch [‘1052724801’, 2024-03-06T11:25, ‘None’, ‘’]

Clickable Tags v20 [‘1739176371’, 2022-01-30T17:58, ‘None’, ‘’]

Colorful Tags Hierarchical Tags [‘594329229’, 2022-09-15T11:06, ‘None’, ‘’]

Custom Background Image and Gear Icon [‘1210908941’, 2023-04-18T21:19, ‘None’, mod]

Edit Field During Review [‘1020366288’, 2022-08-29T15:38, ‘None’, ‘’]

Extended Tag AddEdit Dialog [‘1135507717’, 2023-11-11T11:58, ‘None’, ‘’]

FSRS Helper Postpone Advance Load Balance Easy Days Disperse Siblings [‘759844606’, 2024-11-30T06:53, ‘None’, ‘’]

Find cards from UWorld test [‘444814983’, 2024-07-19T02:19, ‘None’, ‘’]

High Yield Tags [‘1918380616’, 2023-01-10T14:14, ‘None’, ‘’]

Highlight Search Results in the Browser [‘225180905’, 2023-10-21T15:17, ‘None’, ‘’]

Image Occlusion Enhanced [‘1374772155’, 2022-04-09T03:15, ‘None’, ‘’]

ImageResizer [‘1214357311’, 2023-12-02T20:58, ‘None’, ‘’]

Learning Step and Review Interval Retention [‘1949865265’, 2024-01-06T12:48, ‘None’, ‘’]

Mini Format Pack [‘295889520’, 2023-11-02T14:00, ‘None’, ‘’]

More Decks Stats and Time Left [‘1556734708’, 2024-08-19T18:49, ‘None’, ‘’]

More Overview Stats 21 [‘738807903’, 2024-08-22T05:14, ‘None’, ‘’]

More Overview Stats [‘2116130837’, 2024-04-15T14:07, ‘None’, ‘’]

Review Heatmap [‘1771074083’, 2022-06-29T21:43, ‘None’, ‘’]

Scale Images [‘1312865748’, 2023-11-02T02:45, ‘None’, ‘’]

See Previous Card Ratings in Reviewer [‘1906641654’, 2021-08-19T17:32, ‘None’, ‘’]

Show total review count in main screen [‘1730200873’, 2023-10-14T13:00, ‘None’, mod]

Study Time Stats [‘1247171202’, 2024-02-24T11:59, ‘None’, ‘’]

Symbols As You Type [‘2040501954’, 2024-01-20T00:42, ‘None’, ‘’]

True Retention [‘613684242’, 2017-11-19T15:43, ‘None’, ‘’]

True Retention by Card Maturity Simplified [‘1779060522’, 2020-06-28T09:45, ‘None’, ‘’]

True Retention by Card Maturity [‘923360400’, 2017-08-29T15:00, ‘None’, ‘’]

extended editor for field for tables searchreplace [‘805891399’, 2023-07-31T10:12, ‘None’, mod]

===IDs of active AnkiWeb add-ons===

1020366288 1052724801 1135507717 1136455830 1210908941 1214357311 1247171202 1312865748 1322529746 1374772155 1556734708 1730200873 1739176371 1771074083 1779060522 1906641654 1918380616 1949865265 2040501954 2116130837 225180905 295889520 444814983 594329229 613684242 738807903 759844606 805891399 817108664 923360400

===Add-ons (inactive)===

(add-on provided name [Add-on folder, installed at, version, is config changed])

Anki Format Shuffler [‘148580004’, 2024-08-09T19:19, ‘None’, mod]

Anki Remote - Customize [‘693153301’, 2024-11-03T15:22, ‘None’, mod]

Customize Keyboard Shortcuts [‘24411424’, 2023-11-01T05:17, ‘None’, ‘’]

ReColor [‘688199788’, 2024-03-02T20:45, ‘3.0’, mod]

Thank you for all of these details – it really helps!

That’s good, because that means you can fix everything from one place. The goal will be to get that MacBook collection looking perfect, and then use that to paper over whatever is going on in your Windows install. So all of these suggestions you should do on your MacBook.

This is obviously going to be a problem, since it’s about 20x the collection limit for syncing. :sweat_smile: There are a few ways to track down what is happening there, so you’ve got some sleuthing to do.

  • If you go into the backups folder for your profile, you’ll see those 70+ backup files that Anki has been automatically making for you. They are in order by date, so look for big size jumps and think about what happened around those dates. You mentioned something changed in the past month or so, and I bet you’ll see that there too.
  • Use the Note Size add-on to figure out what decks/notes in your collection have ballooned in size. [You already have a lot of add-ons, so I am reluctant to recommend another, but this has been really helpful for folks finding runaway size issues. I recommend that after you get what you need from it, you disable or remove it.]
    • Try showing the “Size” or “Size (text)” column, and sorting by it to see what the largest notes are.
    • Looking at those notes, if there’s no visible excess of text, check the HTML view of the fields by clicking the < > above the field. Text can be hiding in your fields from things you copied in from other locations that brought too much formatting with them. [A favorite I keep seeing in my own collection is pointless HTML formatting applied to every word/punctuation char, like coding "much": as –
<span style="font-weight: inherit; font-style: inherit;">"much</span>
<span style="font-weight: inherit; font-style: inherit;">"</span>
<span style="font-weight: inherit; font-style: inherit;">: </span>

When you find the troublemakers, start with the simple things:

  • Delete all notes/decks you don’t need. [And when you do, run Check Media and delete unused media again.]
  • Run Tools > Check Database and make sure you don’t have issues there.
  • If you see patterns of useless text (like the “inherit” one above), you should be able to Find & Replace them away.

Looking at the size of your collection, I doubt that is going to be enough, but it will help focus your attention on what else is needed.


Given the ballooning size and slowness issues you’re having –

  • Consider starting Anki in “safe mode” to disable all of your add-ons at once.
  • If you database is struggling, you may need to think about exporting your collection data and starting fresh in another profile by importing that in.

It’s quite comforting that your collections have the same number of missing files. Hopefully that number will go down as you start deleting unnecessary/incomplete decks. It’s also okay to run Check Media again to delete the media trash folder.

1 Like