8 min readUpdated December 4, 2026

Ollama 'Process Has Terminated': Read the Error

Ollama's "process has terminated" error means the model process stopped. The text after the colon usually says why. How to read it and fix each cause.

By Cogniq Labs ResearchEvidence policy

InferenceLanguage Models
Isometric illustration of a model server block next to a broken process block split into pieces, with a log of lines leading from the break.

This error means the separate program that Ollama starts to run your model stopped. The words "process has terminated" tell you almost nothing. The text that follows them usually tells you the reason. Read the whole line, then the server log. Most cases are memory, an unsupported or damaged model, or a GPU driver problem.

What the message is made of

Ollama runs each model in its own process, separate from the main server. When that process ends unexpectedly, the server builds an error message. You may see either name:

  • llama runner process has terminated, in older versions
  • llama-server process has terminated, in the current source code

The current code assembles it from up to two pieces of information:

llama-server process has terminated: <exit status>: <last error captured>

The second part is the useful one. Ollama watches the output of the model process and keeps the last lines that look like errors. Its error capture code looks for markers such as error:, panic:, fatal error:, CUDA error, ROCm error, cudaMalloc failed, error loading model and GGML_ASSERT, plus phrases that mean memory ran out. If one of those appeared, it is appended to the message. If nothing was captured, you get only the exit status, and the server log is your next step.

Read the part after the colon

What it contains Likely cause Start with
out of memory, cudaMalloc failed, failed to allocate Not enough GPU or system memory Section 1
error loading model The model file or its format Section 2
CUDA error or ROCm error GPU driver or library problem Section 3
GGML_ASSERT or panic: A bug or an unsupported case Section 4
signal: killed The operating system stopped the process Section 1
Only an exit status No error captured Read the log (Section 5)

Ollama itself treats several phrases as memory failures, including out of device memory, hipMalloc failed, allocation failed, insufficient memory and failed to reserve graph.

Three examples of reading a message

These lines are invented to show the method. Real messages vary with version and system.

llama-server process has terminated: exit status 2: error loading model: unknown model architecture

The useful part is after the second colon. The model file uses a design this version does not understand, so update Ollama before anything else.

llama-server process has terminated: exit status 1: cudaMalloc failed: out of memory

Memory. Shorten the context or use a smaller model, and check what else is on the GPU.

llama runner process has terminated: exit status 2

Nothing was captured. Open the server log and read the twenty lines before this one, with OLLAMA_DEBUG=1 set if they are not informative.

Specific messages and what they mean

These are the forms people most often paste into a search box. In each, the words before the cause are only a wrapper. If your line starts with Error: 500 Internal Server Error:, that is the web response around the real message, so read on past it.

llama-server process has terminated: signal: killed

The operating system ended the process; the program did not choose to stop. On Linux the usual reason is that the machine ran out of memory and the kernel's out-of-memory killer picked this process. Confirm it:

sudo dmesg | grep -i -E "killed process|out of memory"

If you see the Ollama model process there, you need less memory use or more memory: a smaller model, a shorter context, one request at a time, or more RAM or swap. In a container, check its memory limit, as described below. If nothing shows in the system log, look for something else that stops processes, such as a service manager with its own memory limit.

llama-server process has terminated: exit status 0xc0000409

This is a Windows code, often printed with "The system detected an overrun of a stack-based buffer in this application". That wording is misleading. Microsoft's Raymond Chen explains that STATUS_STACK_BUFFER_OVERRUN no longer means a buffer was overrun: it means the program decided to terminate itself immediately. Microsoft's documentation of fail-fast requests says they appear as exactly this code, and Chen's post lists a normal program abort, including one after a failed internal check, as a way to get it.

So treat it as "the model process gave up", not as a security problem. Look for the text captured after the code, and the log lines just before it. A failed memory allocation, an unsupported model or a GPU backend fault can all end this way. Work through memory first, then update Ollama and your GPU driver, then try a different model to see whether the problem follows the model or the machine.

llama-server process has terminated: exit status 1

A general failure: the process exited and reported an error. The code says nothing about the cause, so the captured text after it, or the log, is all you have. If there is no captured text, set OLLAMA_DEBUG=1, reproduce it and read upwards from the error line.

error loading model, or failed to create or start the model

These wrappers say that loading did not finish. Read to the end of the line for the innermost message. If it mentions memory, use section 1. If it mentions an unknown architecture or a bad file, use section 2. If there is nothing more, the log has it.

The exit status

The exit status is how the operating system reports why the process ended. On Linux and macOS the current code prints it as exit status N. On Windows, for the error codes Windows treats as severe, it prints the hexadecimal value with Windows' own description, such as exit status 0xc0000409 followed by text. Public reports show that code with phi3, and exit status 2 is the one in many reports.

An exit status by itself rarely identifies the cause. Treat it as a clue and use the captured error and the log to decide.

1. Memory

This is the first thing to rule out, because it is the most common and the easiest to test. A model that is too large for the memory available can fail at load time or when it first runs.

  • Lower the context length: OLLAMA_CONTEXT_LENGTH=4096 ollama serve.
  • Set OLLAMA_NUM_PARALLEL=1.
  • Unload other models with ollama stop.
  • Try a smaller quantization or a smaller model.

If a small context works and a large one fails, you have found the cause. The full method is in why Ollama runs out of memory. signal: killed often means the system's own memory protection ended the process; one public report shows it when running a very large model on a machine with 64 or 128 GB of RAM. On Linux, dmesg shows if the kernel killed it.

Containers have their own memory limit

If Ollama runs in Docker with a memory limit, the container can stop the model process even though the host has plenty of free memory. Check whether the container was stopped for memory:

docker inspect <container-name> --format '{{.State.OOMKilled}}'

If it prints true, raise the limit with --memory or remove it. The same applies on Docker Desktop, where the virtual machine has its own memory setting that caps everything inside it, however much RAM your computer has. Check that setting before assuming the model is too large for your machine.

2. The model file

If the message says error loading model, suspect the file or its compatibility.

  1. Download it again: remove it with ollama rm <model> and pull it again. A partial or damaged download fails on load.
  2. Update Ollama. A model released after your Ollama version may use an architecture it does not know. Updating is often the whole fix.
  3. Try an official model. If a small official model runs and your imported file does not, the problem is the file or its conversion, not your computer.

3. GPU and drivers

If the captured error mentions CUDA or ROCm, check the GPU stack.

  • Confirm the driver works (nvidia-smi) and meets the version Ollama requires, covered in why Ollama is using the CPU.
  • After sleep on Linux, reload the NVIDIA UVM driver.
  • In Docker, confirm the container can see the GPU: Ollama's troubleshooting page suggests docker run --gpus all ubuntu nvidia-smi.
  • On AMD, check the ROCm driver version and that your user has access to the device groups.

The same page documents an experimental override, OLLAMA_LLM_LIBRARY, that forces a specific backend, for example a CPU one. If the model runs on the CPU backend but crashes on the GPU, the problem is in the GPU path. The override is for diagnosis, not a permanent fix, and library names differ between releases, so check the log for the ones your version has.

4. Bugs and unsupported cases

GGML_ASSERT or panic means the program hit a condition it did not expect. You can often work around it by updating, or by going back to an earlier version if the problem started with an update. The troubleshooting page shows installing a specific version on Linux:

curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.5.7 sh

The number there is the documentation's example. Choose the version that last worked for you.

If the problem is reproducible, report it on GitHub with the log, your Ollama version, the model name, the operating system and the GPU. Search existing issues first.

5. Read the server log

The log has more than the error line: what Ollama detected, how much memory it planned to use, and what the model process printed just before stopping. Locations from the troubleshooting page:

System Location
macOS ~/.ollama/logs/server.log
Linux with systemd journalctl -u ollama --no-pager
Docker docker logs <container-name>
Windows server.log in %LOCALAPPDATA%\Ollama

Set OLLAMA_DEBUG=1 before starting Ollama for more detail. Reproduce the error, then read the lines just before it.

Related errors

timed out waiting for llama-server to start. Loading made no progress for too long. In the current source, the default limit is 5 minutes and the OLLAMA_LOAD_TIMEOUT variable changes it. A very large model on a slow disk can hit it, so move the model to faster storage or raise the limit.

Temporary directory errors on Linux. If your system mounts the temporary directory with noexec, the troubleshooting page says to set OLLAMA_TMPDIR to a location the Ollama user can write to.

Connection errors are a separate problem, covered in Ollama connection refused.

A short order of attack

  1. Copy the full error line.
  2. Read the text after the last colon.
  3. Lower the context and use a small model to rule out memory.
  4. Update Ollama and re-pull the model.
  5. Check the GPU driver.
  6. Read the log with debug on.
  7. Report it with the details above.

Keep a note of what fixed it. The same message tends to come back after an update or a new model, and a record of the cause, the command that worked and the Ollama version turns the next occurrence into a two minute job instead of another search.

What we do not know

We read Ollama's source on its main branch, which changes often, so your version may word things differently or capture errors in another way. Many reports of this error end without a confirmed cause, and several different faults produce the same message. The steps here are ordered to rule out the common causes first, not to guarantee a fix.

Sources

  1. STATUS_STACK_BUFFER_OVERRUN doesn't mean that there was a stack buffer overrun — Microsoft
  2. __fastfail — Microsoft Learn
  3. llm/llama_server.go (model process management) — GitHub
  4. llm/status.go (error capture) — GitHub
  5. Ollama troubleshooting — Ollama
  6. Issue 11721: llama runner process has terminated: exit status 2 — GitHub

Frequently asked questions

What does "llama runner process has terminated" mean?

Ollama runs each model in a separate background process, and that process stopped before or while serving your request. The message reports the exit status and, when Ollama captured it, the last error the process printed, which usually names the cause.

How do I fix "llama runner process has terminated exit status 2"?

Exit status 2 alone does not say why. Read the text after it and the server log. The most useful checks are memory (lower the context length, use a smaller model), updating Ollama, re-downloading the model and confirming the GPU driver works.

Why does my version say "llama-server process has terminated"?

Newer Ollama source code uses the name llama-server for the model process, so the message reads "llama-server process has terminated". Older versions say "llama runner process has terminated". The meaning is the same.

What does "exit status 0xc0000409" mean in Ollama?

It is a Windows code named STATUS_STACK_BUFFER_OVERRUN, but Microsoft engineers explain that today it means a program terminated itself immediately, which includes an ordinary abort. It is not proof of a security flaw. Read the captured error and the server log for the real cause.

What does "signal: killed" mean in this error?

The operating system stopped the process. On Linux and macOS this commonly happens when the machine runs out of memory. Check the system log and use a smaller model or a shorter context.

What does "timed out waiting for llama-server to start" mean?

Loading stalled for longer than Ollama allows. In the current source the default stall limit is 5 minutes and OLLAMA_LOAD_TIMEOUT changes it. A slow disk or a very large model can trigger it.

Related reading