You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem description:
Omnisearch appears to get stuck in AI image analysis regularly. Restarting Obsidian does not help, only restarting the Ollama Server helps, but after a few minutes, the whole issue repeats.
When I go to the Network tab in the developer tools (Ctrl-Shift-i) I can see the chat requests pouring in. All looks good, but after a while, a chat request will remain in pending state for eternity. There's nothing special about the image being analyzed (a png just like many others in my vault). I then checked what Ollama is doing:
C:\Users\foobar>ollama ps
NAME ID SIZE PROCESSOR UNTIL
llava-llama3:latest 44c161b1f465 7.2 GB 28%/72% CPU/GPU Stopping...
Looks like it's trying to stop because no new request came in for a few minutes. But it never actually stops. It remains in this state for hours if I let it, while continuing to consume CPU & GPU:
If I kill the Ollama_llama_server.exe, Obsidian/Omnisearch will restart it and continue to analyze a bunch of images before stopping again.
Interestingly, after the server restarts, the response to the initial request does arrive. This looks like magic to me - I'd expect the request to fail and then the plugin would either retry or just head on to the next image. But that doesn't seem to be what's happening. The server restarts and then the original request returns:
Even more funny is that when I look up the resulting cache item it looks as if Ollama has been stuck in an infinite loop only interrupted by me killing the server:
(Note: It doesn't actually say Zaphod Beeblebrox - there's a name of someone I know and this name is also written on the image)
So perhaps this is an Ollama issue or an issue with the AI Image Analyzer. Yet, I'm posting it here as I believe that even if the problem is with one of its dependencies, it does affect Omnisearch and perhaps there's a quick fix/workaround by adding a timeout to the requests on Omnisearch side or by forcibly restarting the server if it becomes unresponsive?
Environment:
Omnisearch version: 1.25.2
AI Image Analyzer version: 0.2.0
Obsidian version: 1.7.7
Operating system: Windows 11
Number of indexed documents in my vault (approx.): The vault has ~7,000 MD files + ~7,000 attachments of which ~2,500 are images (JPG, PNG, GIF).
Things I tried:
Does the problem occur when Omnisearch is the only active community plugin: Ominsearch + AI Image analyzer, yes.
Does the problem occur when you don't index PDFs, images, or other non-notes files: The issue is about indexing images.
Does the problem occur after a cache reset: yes it does.
The text was updated successfully, but these errors were encountered:
So perhaps this is an Ollama issue or an issue with the AI Image Analyzer.
Yes.
I can add a timeout on Omnisearch's side, but it's not ideal: either I throw an exception and the file is simply removed from Omnisearch's index, or I save an empty string and Omnisearch won't ask AI Image Analyzer again unless you empty the cache. It will inconvenience the user in both cases, and I'd rather leave that responsibility on AI Image Analyzer since the issue is on their side.
Problem description:
Omnisearch appears to get stuck in AI image analysis regularly. Restarting Obsidian does not help, only restarting the Ollama Server helps, but after a few minutes, the whole issue repeats.
When I go to the Network tab in the developer tools (Ctrl-Shift-i) I can see the chat requests pouring in. All looks good, but after a while, a chat request will remain in pending state for eternity. There's nothing special about the image being analyzed (a png just like many others in my vault). I then checked what Ollama is doing:
Looks like it's trying to stop because no new request came in for a few minutes. But it never actually stops. It remains in this state for hours if I let it, while continuing to consume CPU & GPU:

If I kill the Ollama_llama_server.exe, Obsidian/Omnisearch will restart it and continue to analyze a bunch of images before stopping again.
Interestingly, after the server restarts, the response to the initial request does arrive. This looks like magic to me - I'd expect the request to fail and then the plugin would either retry or just head on to the next image. But that doesn't seem to be what's happening. The server restarts and then the original request returns:

Even more funny is that when I look up the resulting cache item it looks as if Ollama has been stuck in an infinite loop only interrupted by me killing the server:
(Note: It doesn't actually say
Zaphod Beeblebrox
- there's a name of someone I know and this name is also written on the image)So perhaps this is an Ollama issue or an issue with the AI Image Analyzer. Yet, I'm posting it here as I believe that even if the problem is with one of its dependencies, it does affect Omnisearch and perhaps there's a quick fix/workaround by adding a timeout to the requests on Omnisearch side or by forcibly restarting the server if it becomes unresponsive?
Environment:
Things I tried:
The text was updated successfully, but these errors were encountered: