[Bug]: Pinned Ollama 0.24.0 predates upstream fix for hang-on-client-disconnect (permanent CPU spin)
Issue Category
AI Assistant (Ollama)
Bug Description
NOMAD pins ollama/ollama:0.24.0 for the AI Assistant service. This version has a bug where, if a client disconnects mid-generation (e.g. a timed-out request from NOMAD's own RAG/embedding pipeline, or any client giving up on a slow CPU-only response), the underlying llama-server/runner process does not cancel the in-flight work — it's left permanently spinning at 300%+ CPU with no active requests and an empty job queue, and does not recover on its own. Confirmed via direct process inspection (zero HTTP traffic reaching the server, zero BullMQ jobs queued in file-embeddings/benchmarks, yet the runner process's CPU time kept climbing indefinitely).
This is exactly the class of bug fixed upstream in Ollama v0.33.0: "Fixed a hang where agent clients that cancel long prefills... prefill restore points are now trustworthy by construction, so a cancelled prefill/retry resumes where it stopped instead of restarting from scratch." Current latest is v0.33.3.
I verified this directly: pulled ollama/ollama:0.33.3, ran it standalone (isolated container, reusing the same model blob NOMAD had already downloaded, read-only), and reproduced the identical disconnect scenario. On 0.24.0 the runner hangs permanently. On 0.33.3, the server logs srv stop: cancel task → srv update_slots: all slots are idle immediately, and CPU genuinely returns to idle (confirmed via frozen process CPU-time across multiple checks over 30+ seconds).
Good news / immediate workaround: NOMAD's own service-update mechanism (POST /api/system/services/update with target_version, or the Apps page update button) already offers 0.33.3 as an available version and updates cleanly — I used it on my own install and the hang is gone, with the previously-downloaded model persisting through the update. So the fix here isn't new plumbing, it's just bumping the default seeded version so fresh installs don't inherit a version that predates this fix.
This is a similar situation to #439 (fresh installs shipping an outdated pinned Ollama version, resolved by bumping the pin in #513) — except this time the version gap specifically spans a real hang/stability fix, not just missing newer-model support.
Steps to Reproduce
- Install AI Assistant (Ollama) on a fresh/current NOMAD install (ships
ollama/ollama:0.24.0) - Load any model and send a request, then have the client disconnect before the response completes (e.g. a slow CPU-only generation exceeding a caller's timeout — this happens organically via NOMAD's own RAG embedding calls, which have a 60s client-side timeout)
- Check
docker exec nomad_ollama ps aux— theollama runnerprocess remains pinned at high CPU indefinitely with no active requests
Expected Behavior
A disconnected client's request should be cancelled server-side, and the runner should return to idle CPU usage.
Actual Behavior
The runner process spins at 300%+ CPU indefinitely, doesn't release the load, and doesn't recover without manually killing the process. On weak/CPU-only hardware this makes the AI Assistant effectively unusable after the first slow/disconnected request, since it starves the rest of the system (I observed it competing with an active Wikipedia ZIM download for CPU).
N.O.M.A.D. Version
1.34.1
Operating System
Other (not yet officially supported)
Docker Version
Docker version 29.7.2, build a7dcaa6fdb
Do you have a dedicated GPU?
No
GPU Model (if applicable)
N/A — CPU-only (an old NVIDIA GT 650M is present but has no driver/container-toolkit installed; AI Assistant correctly detected this and fell back to CPU-only)
System Specifications
CPU: Intel Core i7-3740QM @ 2.70GHz (4C/8T, 2012-era, no AVX2) RAM: 15GB total Available Disk Space: ~290GB GPU: NVIDIA GT 650M (unused, no driver/toolkit)
Service Status (if relevant)
nomad_ollama was running (CPU-only fallback). Reproduced with a fresh llama3.2:3b pull and independently with NOMAD's auto-pulled nomic-embed-text:v1.5 RAG embedding model.
Additional Context
Install was via manual Docker Compose on an Arch-based (Omarchy) host rather than the official Debian/Ubuntu installer script, since the official installer requires apt-get. Flagging transparently per the template's guidance, though the core finding — Ollama 0.24.0 hangs on client-disconnect, 0.33.3 doesn't — was independently reproduced via a standalone ollama/ollama container completely outside NOMAD, so it should apply regardless of host OS or install method.
Source: Crosstalk-Solutions/project-nomad