Error: 500 Internal Server Error: llama-server process has terminated: signal: killed means the process that loads your model was killed while loading it, and on Linux that is the out-of-memory killer at work: the model needs more RAM than the machine, VM or container can give. Run a smaller model, or give the box more memory.

In Docker, raise the container's -m limit (or change it on the fly with docker update --memory), or pick a smaller tag. Once a model loads, ollama ps shows how much memory it really takes.

The error

PS> docker exec fix5-ollama-mem ollama run qwen2.5:14b "hi"
Error: 500 Internal Server Error: llama-server process has terminated: signal: killed
PS> docker exec fix5-ollama-mem ollama run llama3.1:8b "hi"
Error: 500 Internal Server Error: llama-server process has terminated: signal: killed

The server log for the first attempt, with the model's file hash shortened:

time=2026-10-22T12:44:23.296Z level=INFO source=sched.go:686 msg="Load failed" model=/root/.ollama/models/blobs/sha256-2049f5674b1e... error="llama-server process has terminated: signal: killed"

Why it happens

Ollama runs every GGUF model in a child process, llama-server. When a container hits its memory limit, or a whole machine runs out, the Linux kernel's out-of-memory killer ends a process with SIGKILL, normally the biggest one, and Ollama reports how its child ended: signal: killed. The container's memory.events file confirmed it, counting oom_kill 2, one per failed run. The container had -m 1500m, which Docker pairs with the same amount again in swap (memory.swap.max read 1572864000), about 3 GB in all. llama3.1:8b needs 5.6 GB once loaded and qwen2.5:14b more, so both died partway through loading.

Ollama did not refuse in advance. Its log read total="1.5 GiB" from the container limit and reported free_swap="4.0 GiB", the swap of the whole Docker VM, and the load went ahead. Older releases had an up-front check that printed model requires more system memory (X) than is available (Y), and they worded the kill as llama runner process has terminated; both strings are in the source at tag v0.5.7. Neither appeared with 0.40.8. A model that only just does not fit can also load and crawl: qwen2.5:3b took 2.2 GB in the same container, partly in swap, and generated 0.19 tokens per second.

The fix

PS> docker exec fix5-ollama-mem ollama run qwen2.5:3b "Reply with the single word ready."
Ready
PS> docker update --memory 8g --memory-swap 12g fix5-ollama-mem
fix5-ollama-mem
PS> docker exec fix5-ollama-mem ollama run llama3.1:8b "Reply with the single word ready."
Ready.
PS> docker exec fix5-ollama-mem ollama ps
NAME           ID              SIZE      PROCESSOR    CONTEXT    RUNNER      UNTIL
llama3.1:8b    46e0c10c039e    5.6 GB    100% CPU     4096       llamacpp    4 minutes from now

Two fixes, both confirmed in the same container. A smaller model fits under the old limit; a higher limit lets the original model load. docker update changed the running container's limit and the next load succeeded without a restart; for a new container, put the value in docker run -m 8g instead. Size the limit from the SIZE column of ollama ps plus headroom for the server itself. On a Linux server without Docker the reasoning is the same: compare free -h with the model's size, then choose a smaller tag or add RAM.

How it was reproduced

Docker Desktop on Windows 11, engine 29.8.2, image ollama/ollama:latest (Ollama 0.40.8), CPU only, started as docker run -d --name fix5-ollama-mem -m 1500m -e OLLAMA_NOPRUNE=1 -v ...\.ollama\models:/root/.ollama/models:ro ollama/ollama. The host's model folder was mounted read-only so that the 8b and 14b models did not have to be downloaded again, with pruning off so the server would not try to delete anything. An earlier container with the same limit and its own storage pulled qwen2.5:3b and ran it slowly. fix5-ollama-mem is the test's name; both containers were removed with docker rm -f -v.

Frequently asked

What does 'llama-server process has terminated: signal: killed' mean in Ollama?
The process that loads the model was killed with SIGKILL while loading, which on Linux almost always means the kernel's out-of-memory killer. The model needs more RAM than the machine or container allows. Use a smaller model or add memory.
How much memory does an Ollama model need?
Check the SIZE column of ollama ps once the model is loaded. In the test, on CPU with a 4096-token context, qwen2.5:3b took 2.2 GB and llama3.1:8b took 5.6 GB. Leave headroom on top for the operating system and the Ollama server.
How do I give the Ollama Docker container more memory?
Start it with a higher -m value, for example docker run -m 8g, or change a running container with docker update --memory 8g --memory-swap 12g. In the test the next model load used the new limit without a restart.

More decoded errors in the Fixes category. For the memory arithmetic behind model sizes, measured on CPU and GPU, see What server does a clinic need for a local LLM?