Ollama Not Working? Match the Error to the Real Fix
Want to go deeper than this article?
Free account unlocks the first chapter of all 25 courses — RAG, agents, MCP, voice AI, MLOps, real GitHub repos.
Ollama’s running. Here’s what to build with it. Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.
Published April 11, 2026 · Updated August 23, 2026 · 12 min read
Quick answer: Ollama rarely fails for a vague reason — it fails with a specific string, and that string decides everything else. Confirm the binary exists with ollama --version, confirm the server answers with curl http://localhost:11434/api/tags, then find your exact error text in the index below. The most-reported failure of all, llama runner process has terminated, is not a single bug: the exit status printed after it is the real diagnosis, and people skip straight past it.
This page is an index, not a manual. Every error gets the short version here — what it means and the first thing to change — then a link to the page that takes it apart properly. If you already know your error string, go straight to the table.
Which Ollama error do you actually have?
The "reported" column counts open and closed issues on github.com/ollama/ollama with that phrase in the issue title, searched 22 August 2026. It is a rough measure of how often each one bites, not a severity ranking, and it drifts with every release.
| Error text you see | Reported | What it actually is | Where the fix is |
|---|---|---|---|
llama runner process has terminated | 114 | The child llama-server process died before answering a health check. The exit status after the colon is the diagnosis | Runner terminated: reading the exit code |
out of memory (all forms) | 72 | Either the CUDA allocator or the kernel OOM killer. Two different failures wearing one phrase | Below |
500 Internal Server Error | 70 | A wrapper, not a cause. The real error is one line down in the server log | Below |
GGML_ASSERT(...) failed | 44 | A ggml assertion fired. The text inside the parentheses is the actual bug report | Runner terminated: reading the exit code |
OLLAMA_MODELS ignored | 31 | The variable is set in your shell; the daemon that reads it is not your shell | OLLAMA_MODELS not working, by platform |
| systemd service problems | 29 | On Linux the service file, not your profile, owns the environment | OLLAMA_MODELS not working, by platform |
| WSL2 GPU problems | 26 | The distro needs the Windows-side CUDA driver; the Linux driver package breaks it | Below |
could not connect to ollama app | 25 | The CLI found no server on the host it was told to use | Connection refused on 11434 |
unknown model architecture | 23 | Your Ollama build predates the model. Nothing you configure will fix it | Below |
unexpected EOF | 21 | A truncated blob on disk from an interrupted pull | Pull stuck or slow |
403 Forbidden | 20 | A CORS origin rejection, which is why curl on the same machine still works | Below |
connection refused | 19 | Usually the server is fine and bound to 127.0.0.1 only | Connection refused on 11434 |
max retries exceeded | 14 | Registry or proxy, almost never the model | Pull stuck or slow |
digest mismatch | 12 | One cached blob is corrupt. Re-pulling reuses it and fails identically | Pull stuck or slow |
no such host | 10 | DNS, not Ollama | Pull stuck or slow |
model requires more system memory | 7 | Free RAM, not installed RAM, is the number being compared | RAM and VRAM by model size |
no compatible GPUs were discovered | 3 | Discovery failed, so Ollama fell back to CPU and kept running | Below |
Reading articles is good. Building is better.
Free account = 20+ free chapters across 25 courses, with a per-chapter AI tutor. No card. Cancel anytime if you ever upgrade.
Four checkpoints that narrow it down fast
If you do not have an error string yet — Ollama is just "not working" — walk these in order. Each failure points at one row of the table above.
1. Is the binary there? ollama --version. Command not found is a PATH or install problem, not an Ollama problem.
2. Is the server answering? curl http://localhost:11434/api/tags. Connection refused means nothing is listening on that address; JSON back means the server is healthy and your problem is downstream.
3. Can you pull? ollama pull llama3.2:3b. Stalls, digest mismatches and EOFs all live in the download path.
4. Can you run? ollama run llama3.2:3b "Say hello". Whatever it prints now is your error string — take it back to the table.
Why does Ollama say llama runner process has terminated?
Because the Go parent process launched a child (llama-server), the child died before it started answering health checks, and the parent gave up. The phrase itself carries no information; the exit status after it does, and it means three completely different things on three platforms. A Windows hex code such as 0xc0000409 is an NTSTATUS value set by the operating system, signal: aborted (core dumped) means the runner killed itself on a failed assertion, and a bare exit status 2 means nothing at all on its own.
Full breakdown of every code, signal and the stderr filter that decides whether you get a useful tail: llama runner process has terminated, decoded by exit code.
Why does Ollama refuse connections on port 11434?
Nine times out of ten the server is running perfectly and listening only on 127.0.0.1, so anything coming from another host, another container or a bridged Docker network gets refused before Ollama ever sees it. Setting OLLAMA_HOST=0.0.0.0:11434 fixes that case — but only if the process that reads the variable is the one you restarted, which on Linux means the systemd unit rather than your terminal.
The other causes (a second instance holding the port, a firewall, a proxy rewriting the Host header) are separated out in Ollama connection refused on port 11434. If you are exposing the server deliberately, read securing an Ollama server first — 0.0.0.0 with no auth in front of it is an open API.
Reading articles is good. Building is better.
Free account = 20+ free chapters across 25 courses, with a per-chapter AI tutor. No card. Cancel anytime if you ever upgrade.
Why does Ollama say the model requires more system memory?
Because the comparison is against available RAM, not installed RAM. Close the browser and the chat apps first; that alone often moves enough. If it does not, the model genuinely does not fit and the honest fix is a smaller one.
You can estimate before you download. A Q4_K_M quantisation lands near 0.6 GB per billion parameters, so an 8B model is roughly 8 × 0.6 ≈ 4.8 GB of weights, a 14B is ~8.4 GB, and a 70B is ~42 GB — then add the KV cache and whatever the OS is already holding. Exact per-model figures, including the VRAM split, are in the Ollama RAM and VRAM table by model size; if you are still choosing hardware, start at Ollama system requirements.
The GPU-side twin of this error, cudaMalloc failed: out of memory, is not the same failure. Nothing swaps for VRAM, so closing apps does not help — you shrink the context, drop to a smaller quantisation, or move layers to CPU.
Why does ollama pull stall, restart, or fail on a digest mismatch?
Because the download is resumable, and resume is the thing that breaks. A stalled bar that jumps backwards is Ollama re-requesting a chunk range; a digest mismatch means one cached blob on disk is corrupt and every retry cheerfully reuses it, which is why re-running the identical command fails identically. Deleting that one blob — not the whole model — is the fix.
Proxy variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) are read by Ollama and are the usual cause on corporate networks. The full set of download failures, including unexpected EOF, max retries exceeded and no such host, is in Ollama pull stuck or slow.
Why is OLLAMA_MODELS being ignored?
Because you set it somewhere the server never reads. Three different things eat it, one per platform: on Linux the daemon runs under systemd and never inherits your shell, on macOS the menu-bar app launches from launchd with its own environment, and on Windows the tray app has to be quit from the tray — not just closed — before it picks up a new user variable.
On Linux the reliable form is sudo systemctl edit ollama, adding an Environment= line under [Service], then sudo systemctl daemon-reload && sudo systemctl restart ollama. Per-platform detail, including where the models actually move to and what happens to the old blobs, is in OLLAMA_MODELS not working: fix it by platform.
Why does Ollama not see my GPU?
Usually the driver, and usually it is not fatal — when GPU discovery fails, Ollama logs it and falls back to CPU, so the symptom you notice is "suddenly very slow" rather than a crash. Check the log first: journalctl -u ollama --no-pager --follow --pager-end on Linux, cat ~/.ollama/logs/server.log on macOS, explorer %LOCALAPPDATA%\Ollama on Windows.
Three checks in order:
- Driver version. Ollama's own Windows requirements list NVIDIA driver 551.61 or newer, and Windows 10 22H2 or newer. On Linux, run the latest driver your distro offers.
- Group membership (AMD on Linux). Access to
/dev/kfdneedsvideoand/orrendergroup membership —sudo usermod -aG video,render ollama, then restart the service. This is called out directly in Ollama's official troubleshooting docs, which also list the NVIDIA init error codes (3, 46, 100, 999) you may see in the log. - WSL2. Install the Windows-side NVIDIA driver and let WSL expose it; installing a Linux NVIDIA driver package inside the distro is what usually breaks GPU passthrough. Verify with
nvidia-smiinside the distro before blaming Ollama.
Running more than one card, or mixing an iGPU with a dGPU? Ollama multi-GPU setup covers device selection and OLLAMA_SCHED_SPREAD.
Why is Ollama slow even when it runs?
Because the model is on the CPU, or partly on the CPU. When a model does not fit entirely in VRAM, Ollama splits layers between GPU and CPU and the CPU layers set the pace for the whole thing — which is why a model that "only just" fits can be slower than a smaller one that fits comfortably. Watch nvidia-smi during generation: 0% GPU utilisation means you are on the fallback path described above.
The other repeat offenders are thermal throttling on laptops and a second process holding VRAM. Ranked fixes with the diagnostic commands for each: why your local LLM is slow, 12 fixes ranked.
Why does failed to load model keep coming back?
Because it is a category, not a cause. In practice it is a truncated or corrupt blob from an interrupted pull, a GGUF quantisation format newer than your Ollama build, or a permissions mismatch on ~/.ollama after running the server once as root.
Take them in that order:
# 1. Re-pull the model (fixes truncated and corrupt blobs)
ollama rm llama3.2 && ollama pull llama3.2
# 2. Update Ollama (fixes unsupported quant formats)
curl -fsSL https://ollama.com/install.sh | sh # Linux
brew upgrade ollama # macOS Homebrew
# 3. Fix ownership after a root run
sudo chown -R $(whoami) ~/.ollama
If it survives all three, the failure is happening inside the runner and the real message is in the log — see reading the runner exit code.
Why does a brand new model say unknown model architecture?
Because support for a model architecture ships in an Ollama release. If your build predates the model, no configuration, quantisation or re-pull will change the answer — the loader genuinely does not know the architecture name in the file header. This bites hardest when you import a GGUF from Hugging Face days after it appears.
Upgrade Ollama and try again; if the newest release still refuses it, the architecture has not landed yet. Ollama version history is the fastest way to see which release added what.
Why do I only get a 500 Internal Server Error?
Because the 500 is the HTTP wrapper your client shows you, not the failure. The Python and JavaScript SDKs, Open WebUI, n8n and LangChain all surface it the same way, which is why searching the string finds nothing useful — there is no error to search yet.
Get the real one from the server, not the client:
# Linux (systemd)
journalctl -u ollama --no-pager -n 100
# macOS
cat ~/.ollama/logs/server.log
# Docker
docker logs <container-name>
Then take the line you find back to the index at the top. Ollama's troubleshooting docs list every log location, including the Windows server-#.log rotation.
Why does my app get 403 Forbidden when curl works?
Because it is a CORS rejection, and curl does not send an Origin header. A browser extension, an Electron or Tauri app, or a web front-end does — and Ollama compares that origin against OLLAMA_ORIGINS before it will answer. The request never reaches the model.
Set OLLAMA_ORIGINS to the origins you actually want (a comma-separated list), restart the server process rather than the client, and remember the platform rules above about which process reads your variables. Scoping it safely, rather than pasting a wildcard, is covered in securing your Ollama server.
How do I change the context length without breaking the load?
Not with a command-line flag — ollama run has no --num-ctx option. There are exactly three places the value can come from: the OLLAMA_CONTEXT_LENGTH environment variable on the server, a /set parameter num_ctx 8192 line inside an interactive session, or a PARAMETER num_ctx line in a Modelfile.
# Server-wide default
OLLAMA_CONTEXT_LENGTH=8192 ollama serve
# Just this session
ollama run llama3.2
>>> /set parameter num_ctx 8192
Per Ollama's own environment reference, OLLAMA_CONTEXT_LENGTH defaults to "4k/32k/256k based on VRAM" — so raising it is what pushes a model that previously fit into an out-of-memory failure. If you need long context permanently, bake it into a Modelfile instead; see the Ollama Modelfile guide.
Why does the model answer with gibberish?
Three causes, in rough order of likelihood: the quantisation is too aggressive (Q2_K and the IQ1 formats trade a lot of quality for size), the model is simply too small for what you asked of it, or the file is corrupt. A 1B model producing incoherent long-form text is not broken, it is limited.
Test the base model with no custom Modelfile before you debug anything else — if the base model is coherent, your system prompt or template is the problem, not the weights.
Why is the ollama command not found after installing?
Because the shell you are typing into was opened before the installer edited PATH. Close every terminal window — on Windows Terminal, the whole app, not just the tab — and open a fresh one. If it still fails: on macOS the direct-download .app puts the binary inside the bundle, so symlink it with sudo ln -sf /Applications/Ollama.app/Contents/Resources/ollama /usr/local/bin/ollama; on Windows, re-run the installer from ollama.com/download/windows and check Defender's quarantine list before assuming it failed.
Platform walkthroughs: Ollama on Windows and Mac local AI setup. If this is your first install, 15 first-time Ollama setup mistakes will save you the next four errors on this page.
Which environment variables does Ollama actually read?
These are the ones the server itself reports, taken from envconfig/config.go — the same list ollama serve --help prints. Names that are not on this list (there are several circulating, including an "OLLAMA_METAL") are not read by Ollama at all.
| Variable | What it controls | Default / example |
|---|---|---|
OLLAMA_HOST | IP address and port for the server | 127.0.0.1:11434 |
OLLAMA_MODELS | Path to the models directory | /mnt/ssd/models |
OLLAMA_ORIGINS | Comma-separated list of allowed CORS origins | — |
OLLAMA_CONTEXT_LENGTH | Context length unless otherwise specified | 4k/32k/256k based on VRAM |
OLLAMA_KEEP_ALIVE | How long models stay loaded in memory | 5m |
OLLAMA_LOAD_TIMEOUT | How long a stalled model load is tolerated | 5m |
OLLAMA_MAX_LOADED_MODELS | Maximum loaded models per GPU | — |
OLLAMA_NUM_PARALLEL | Maximum parallel requests | — |
OLLAMA_MAX_QUEUE | Maximum queued requests | — |
OLLAMA_KV_CACHE_TYPE | Quantisation type for the K/V cache | f16 |
OLLAMA_GPU_OVERHEAD | VRAM reserved per GPU, in bytes | — |
OLLAMA_SCHED_SPREAD | Always schedule a model across all GPUs | — |
OLLAMA_FLASH_ATTENTION | Enable flash attention | off |
OLLAMA_NOPRUNE | Do not prune model blobs on startup | off |
OLLAMA_DEBUG | Additional debug logging | OLLAMA_DEBUG=1 |
HTTP_PROXY / HTTPS_PROXY / NO_PROXY | Proxy settings used for pulls | — |
Two things trip people up here. OLLAMA_KV_CACHE_TYPE defaults to f16; setting it to q8_0 halves the bytes per cached token, which is the cheapest way to buy back memory when a long context will not fit. And every one of these is read by the server process — exporting them next to an ollama run call changes nothing on a machine where ollama serve is managed by systemd or a desktop app.
How do I reset Ollama completely?
Stop the server, delete the data directory, reinstall. This removes every downloaded model, so budget the bandwidth before you start.
# 1. Stop
pkill -f ollama # Linux/macOS
taskkill /F /IM ollama.exe # Windows
# 2. Remove data
rm -rf ~/.ollama # Linux/macOS
# Windows: delete %LOCALAPPDATA%\Ollama and %USERPROFILE%\.ollama
# 3. Reinstall
curl -fsSL https://ollama.com/install.sh | sh # Linux
brew install ollama # macOS
# Windows: installer from ollama.com/download/windows
# 4. Verify
ollama --version && ollama run llama3.2:3b "Hello"
Moving models to a bigger drive instead of deleting them? Do not copy the directory by hand — set OLLAMA_MODELS properly, as described in OLLAMA_MODELS not working.
What if none of these match?
Collect the evidence before you post. Run OLLAMA_DEBUG=1 ollama serve in a terminal so the log lands in front of you, reproduce the failure, and copy the last error line the runner printed — not the HTTP status your client showed. Then search github.com/ollama/ollama/issues for that literal string, including any assertion text in parentheses.
A bug report that names your OS, ollama --version, the GPU and driver version, and that one log line gets answered. One that says "Ollama is not working" does not.
New to all of this? The complete Ollama guide starts from a clean machine and never reaches most of the errors above.
Ollama’s running. Here’s what to build with it.
Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.
Stop piecing Ollama together from blog posts
Ollama Mastery is 15 chapters end to end — install, model choice, Modelfiles, GPU offload, the API, and the 20 errors that actually happen. Plus 24 more courses.
Liked this? 20 full AI courses are waiting.
From fundamentals to RAG, agents, MCP servers, voice AI, and production deployment with real GitHub repos. First chapter free, every course.
Build Real AI on Your Machine
RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.
Want structured AI education?
25 courses, 519+ chapters, from $9. Understand AI, don't just use it.
Continue Your Local AI Journey
- PILLARBest Ollama Models 2026: 15 Ranked (Coding, Reasoning, Chat)
- AI on Steam Deck: Run Local LLMs with Ollama on SteamOS
- Air-Gapped AI Deployment: Install Ollama With No Internet
- Best Free Local AI Models to Run With Ollama (No API Key)
- Best Ollama Embedding Models Compared for Local RAG
- Best Ollama Models for 8GB RAM 2026: 12 Tested Local Picks
- Best Ollama Models for AI Agents 2026: Ranked by Tool Use
- Best Ollama Models for Tool Calling: BFCL Ranked (2026)
- Best Uncensored Local LLMs: Abliterated Ollama Models
- Build a Local AI Slack & Discord Bot with Ollama + Python
Comments (0)
No comments yet. Be the first to share your thoughts!