obsidian-note-synchronizer icon indicating copy to clipboard operation
obsidian-note-synchronizer copied to clipboard

net::ERR_INSUFFICIENT_RESOURCES

Open FindusDE opened this issue 1 year ago • 2 comments

When trying to sync a large amount of notes (in my case about 1500) on macOS, I get the error message "Anki is not opened or AnkiConnect is not installed!". When syncing only a few notes however, everything works fine.

I do have AnkiConnect installed and configured properly and Anki is definitely also running. I am also aware of App Nap on macOS and have followed the instructions on the AnkiConnect repository page to ensure this does not cause any issues.

The console shows this for every single note (request):

image

Judging by this, it looks like it is not able to handle too many requests at once (since it works with only a few files) which seems to be a known issue in Google Chrome which Obsidian uses to run JavaScript.

Maybe a way to fix this issue could be to bundle the requests or to limit the amount of requests that can be done at the same time.

FindusDE avatar Sep 04 '23 20:09 FindusDE

Hi, thanks for your feedback. The AnkiConnect plugin does have a way to bundle request, namely the multi request type, which allows multiple operation per network request. I haven't utilized this because in my case (~500 notes) the current implementation works well, but yes, it is a good time to fix this.

What do you think is a good bundle size? Like 10? 100?

tansongchen avatar Sep 05 '23 05:09 tansongchen

Hi, thanks for your feedback. The AnkiConnect plugin does have a way to bundle request, namely the multi request type, which allows multiple operation per network request. I haven't utilized this because in my case (~500 notes) the current implementation works well, but yes, it is a good time to fix this.

What do you think is a good bundle size? Like 10? 100?

  • I haven't tested it with as much as 100 requests, but if that works, why not? I think you could just implement bundling into the code and then test it and adjust the bundle size accordingly, right?

FindusDE avatar Sep 05 '23 08:09 FindusDE