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

"Updating note database" appears to be stuck #17

Closed
jmanuel1 opened this issue Dec 10, 2023 · 8 comments
Closed

"Updating note database" appears to be stuck #17

jmanuel1 opened this issue Dec 10, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@jmanuel1
Copy link

I have a lot of notes, most of which were imported from Evernote as HTML. When Jarvis starts to update the note database, it gets to a certain number of notes, usually 250, before not progressing any further. I haven't noticed any logs in DevTools from Jarvis, and the "Universal Sentence Encoder" file exists and has some data in it. And occasionally the related notes search comes up and I can actually use it, but not often.

I wonder if one of my notes is causing the issue, but since I didn't find logs, I wouldn't know which one.

image
image

@alondmnt
Copy link
Owner

alondmnt commented Dec 12, 2023

I'm sorry to hear that @jmanuel1. Never happened to me in the current version of the plugin, but this doesn't mean that there is no bug there. It's certainly possible that one particular note breaks the code for some reason.

It's going to be a little tricky to debug without an example note that enables reproduction of the bug. And because the plugin processes multiple notes in parallel (so not even necessarily the 250th in line) it's going to be tricky to figure out which note fails (unless we find a good error message). It also occurred to me that I personally don't use HTML notes, and it's generally a good idea to do some testing around them (will work on it).

  • Have you enabled debugging in the app before checking the console?
  • Since there is no error message from Jarvis, is it possible that you have a huge note that may take a very long time to process compared to all other notes? (I can already tell that your notes tend to be larger than mine on average, based on the size of the DB.)
  • If you have notes or notebooks that you suspect that may cause the issue, you can place them in a notebook (or sub-notebook), and mark it with Tools-->Jarvis-->Exclude notebook from note DB. It's reversible, anyway.

@alondmnt alondmnt added the bug Something isn't working label Dec 12, 2023
@jmanuel1
Copy link
Author

I haven't enabled debugging. I also haven't checked the size of my notes... I'll get back to you on both of these.

@jmanuel1
Copy link
Author

Here's what logs I managed to capture that seemed relevant

from devtools:
all-logs.txt
jarvis-logs.txt

Unfortunately, I couldn't just right-click and select "save as" in the devtools console, so I copied the above logs manually. They're a bit soupy.

from profile directory:
profile-folder-logs.txt

@alondmnt

@jmanuel1
Copy link
Author

jmanuel1 commented Dec 25, 2023

I've been moving my largest notes to a folder I made specifically to exclude them from the database, and now the update stops at 450 notes.

EDIT: Now it's 750.

@alondmnt
Copy link
Owner

alondmnt commented Jan 3, 2024

Hi @jmanuel1, sorry for the long wait (I was preoccupied with... life). I went over the logs, and although I could not recognize any explicit error, I think that the dynamics of the DB construction are visible in the logs. It's easy to get from the logs the list of the last processed batch of notes, in order to identify the culprit note(s) that stop the update from completing.

Here's how to read it:

  • Every page of notes starts with a message like this one: .... Got message (3): joplin.data.get ['notes'] {fields: Array(5), page: 1, limit: 50} (get the next 50 notes)
  • Then you'll see 50 messages like this one when the processing of each note starts: .... Got message (3): joplin.data.get (3) ['notes', 'd2e4331630a146be9bfc070704b5d6e2', 'tags'] {fields: Array(1)}

So the last group of 'tags' messages contains all the notes that were being processed while Jarvis failed for some reason. 'd2e4331630a146be9bfc070704b5d6e2' in this case is the note ID, and you can use it to locate the note and exclude it from the Jarvis DB, or share it if you wish so I can try to figure out what went wrong. I understand that 50 may be a little too ambiguous, so I'm attaching a custom Jarvis version that processes notes one by one (this is the only change from the current v0.7.0).

Once you've identified a note that failed, you may add the exclude.from.jarvis tag to it, and the next time the update runs it will be ignored. You may repeat this as many times as necessary.

Hope this helps.

Unzip this file and manually install the plugin: joplin.plugin.alondmnt.jarvis.jpl.zip

@alondmnt alondmnt closed this as completed May 2, 2024
@jmanuel1
Copy link
Author

jmanuel1 commented May 8, 2024

@alondmnt Sorry for letting this issue drop by the wayside. I do have something of note, though: when I installed the custom Jarvis version that processes notes one at a time, it seems like the process started to finish! I haven't actually seen it finish since it takes a while, but at the very least, the database update gets very far.

I might try to un-ignore some notes to see if the update process gets stuck on any of them, and also record the process to get evidence that it completes.

@alondmnt
Copy link
Owner

alondmnt commented May 9, 2024

Thanks for the update @jmanuel1.
Note that if you use the latest Jarvis v0.8.2 there's a new setting, Notes: Parallel jobs, where you can select the number of notes that will be processed concurrently during a database update. Setting it to 1 is the same as the custom version that I posted above.

@alondmnt alondmnt reopened this May 9, 2024
@jmanuel1
Copy link
Author

jmanuel1 commented Jun 8, 2024

I installed the latest Jarvis and didn't change the Parallel jobs setting (it's 10), and Jarvis completed updating the database. So, it seems like my issue's fixed. Thanks for the help.

@jmanuel1 jmanuel1 closed this as completed Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants