Error: 500 Internal Server Error: timed out waiting for llama-server to start -
came back from ollama run when the server had OLLAMA_LOAD_TIMEOUT
set to 1ms. Restarting the server without the variable fixed it: the same
model, qwen2.5:0.5b, then loaded and answered.
In the test the variable was in the environment of ollama serve, and the
fix was a restart of that server without it. Without it this version used a load timeout
of 5m0s, as the server's config line shows.
The error
> ollama run qwen2.5:0.5b "hello"
Error: 500 Internal Server Error: timed out waiting for llama-server to start -
The command returned exit code 1. Through the API the same request answered with HTTP 500 and the message as a JSON error:
> curl.exe -s -i http://127.0.0.1:15191/api/generate -d "@body-temp.json"
HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=utf-8
...
{"error":"timed out waiting for llama-server to start - "}
The server's own log had one line for each failed request, at INFO level:
time=2026-11-22T07:45:26.959+05:30 level=INFO source=sched.go:679 msg="Load failed" model=C:\...\models\blobs\sha256-c5396e06af294bd101b30dce59131a76d2b773e76950acc870eda801d3ab0515 error="timed out waiting for llama-server to start - "
Why it happens
The server that failed was started with OLLAMA_LOAD_TIMEOUT=1ms, and its
config line printed OLLAMA_LOAD_TIMEOUT:1ms. The message names
llama-server and not the variable. A first try with 1s did not fail: gemma3:270m loaded and answered
on that server, so one second was enough on this PC for that small model. The server's
config line, the first line of its log, is where the value showed.
The fix
Start the server without the variable. Its config line then reads
OLLAMA_LOAD_TIMEOUT:5m0s, and the run that failed works:
> ollama run qwen2.5:0.5b "hello"
Hello! How can I assist you today?
If you set the variable on purpose, keep it longer than your models need to load on your machine; only the values 1ms, 1s and the 5m0s default were tried here. The Ollama tray app on Windows was not changed in this test, so restarting it after a change of the variable is not shown.
How it was reproduced
Ollama 0.40.16 on Windows 11; the server log's GPU line names an NVIDIA GeForce RTX 3080
Ti Laptop GPU. Test servers of their own were started from Windows PowerShell 5.1, the
1ms one with this line ($d is the scratch folder):
$env:OLLAMA_HOST='127.0.0.1:15191'; $env:OLLAMA_MODELS="$d\models"; $env:OLLAMA_LOAD_TIMEOUT='1ms'; $p=Start-Process -FilePath 'C:\...\Ollama\ollama.exe' -ArgumentList 'serve' -RedirectStandardOutput "$d\serve3-out.txt" -RedirectStandardError "$d\serve3-err.txt" -WindowStyle Hidden -PassThru
The first server had 1s in place of 1ms, and the third was
started the same way in a new PowerShell process without
OLLAMA_LOAD_TIMEOUT. The models, qwen2.5:0.5b and
gemma3:270m, had been pulled into that folder earlier through another test
server (the pull requests are in its request log). Client commands ran in
cmd.exe, sent from PowerShell as cmd /c "<line> 2>&1",
with the same OLLAMA_HOST. The port, the scratch folder and body-temp.json
(a /api/generate body for qwen2.5:0.5b) are the test's own. The
log line's folder is shortened to C:\...\models, and the spinner and terminal
control characters of the console output are left out.
Frequently asked
- What does timed out waiting for llama-server to start mean in Ollama?
- In the test it came back when the server had OLLAMA_LOAD_TIMEOUT=1ms: ollama run printed it with a 500, and the server log called it Load failed. With the variable unset the same model loaded and answered.
- How do I see the OLLAMA_LOAD_TIMEOUT my Ollama server uses?
- Read the server config line, which was the first line of the server log in the test. It lists OLLAMA_LOAD_TIMEOUT, which was 5m0s on Ollama 0.40.16 when the variable was not set.
- How do I fix timed out waiting for llama-server to start?
- Check the server config line for OLLAMA_LOAD_TIMEOUT. In the test it was 1ms; restarting ollama serve without the variable brought back the 5m0s default and the model loaded.
More decoded errors in the Fixes category. A load that ends because the system kills the runner gives 'llama-server process has terminated: signal: killed' instead, and the Windows client's own 'timed out waiting for server to start' is about the app, not a model.