Known errors
Stuck for 20 minutes? Copy the exact error, then look it up here.
The server log is the first place to look. macOS: cat ~/.ollama/logs/server.log. Linux: journalctl -u ollama --no-pager --follow --pager-end. Windows: server.log in %LOCALAPPDATA%\Ollama.
Start and connect
What you see
curl: (7) Failed to connect to localhost port 11434 after 0 ms: Couldn't connect to serverCause
Nothing is running at port 11434.Fix
Open the Ollama app, or runollama serve.Status
Seen on our Mac (curl 8.7.1).What you see
Our Python scripts:Cannot reach Ollama at http://127.0.0.1:11434. Is it running? [Errno 61] Connection refusedCause
Nothing is running at port 11434.Fix
Open the Ollama app, or runollama serve.Status
The[Errno 61] Connection refusedpart: seen on our Mac (Python 3.14.6,URLError). The first part is our script's text (timing.py).What you see
Node:TypeError: fetch failed, causeECONNREFUSEDCause
Nothing is running at port 11434.Fix
Open the Ollama app, or runollama serve.Status
Seen on our Mac (Node v22.23.2).What you see
Node:ReferenceError: fetch is not definedCause
This Node has no built-infetch. Our.mjsscripts need Node 18 or newer.Fix
Install Node 18 or newer.node -vshows yours.Status
Seen on our Mac (Node v16.20.2, 2026-10-23).What you see
Error: listen tcp 127.0.0.1:11434: bind: address already in useafterollama serveCause
The Ollama app already runs the server on port 11434, and the serve command stops at its listen step.Fix
Do not runollama servewhile the app runs: the server is already there. Or quit the app first.Status
Seen on our Mac (macOS, Ollama 0.35.0, 2026-10-23).- Ollama cmd/cmd.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
The Mac installer will not runCause
Ollama on macOS needs macOS 14 (Sonoma) or newer.Fix
Update macOS to version 14 or newer.Status
In Ollama's docs.- Ollama macOS doc, opens in a new tabchecked 2026-10-02
Model
What you see
HTTP 404{"error":"model 'qwen3:1.7b' not found"}Cause
The model is not pulled, or the name has a typo.Fix
ollama pull qwen3:1.7b, then checkollama list.Status
In Ollama's code. Seen on our Mac: curl,speed.mjs,speed.pyandpractice_table.pyall printed this one before the pull (2026-10-23).- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
HTTP 404model "qwen3:1.7b" not found, try pulling it firstCause
Same, found at another step.Fix
ollama pull qwen3:1.7b, then checkollama list.Status
In Ollama's code. None of our four tries printed it.- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
practice_table.pystops after the 0.6b rows withHTTP 404, and no table file appearsCause
The 1.7b model is not pulled. The script saves its two files only after the last run, so the 0.6b rows are lost too.Fix
ollama pull qwen3:1.7b, then run the script again.Status
Seen on our Mac (2026-10-23).What you see
You usedqwen3:4band it thinks, even with"think": falseCause
That tag is a thinking-only build:ollama show qwen3:4blists thinking levelstrueonly. Its thinking and a closing</think>mark come back insidemessage.content.Fix
Useqwen3:1.7bfor the bigger model.Status
Seen on our Mac (Ollama 0.35.0, 2026-10-23).- Ollama library, qwen3 tags, opens in a new tabchecked 2026-10-02
Thinking
What you see
TTFT is many seconds andmessage.contentstays empty for a long timeCause
thinkwas left out. v0.35.0 turns thinking on forqwen3.Fix
Send"think": false.Status
In Ollama's code. Seen on our Mac: lesson 3's two runs with nothinkfield both came back with thinking (2026-10-23).- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
HTTP 400"<model>" does not support thinkingCause
think: truesent to a model that cannot think.Fix
Useqwen3:0.6b, or dropthinkfor that model.Status
In Ollama's code.- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
Our scripts:No answer text came back (done_reason: length). Did thinking use up the token budget?Cause
A token limit ended the reply before any answer text. With thinking on, thinking may use the whole budget.Fix
Raisenum_predict, or turn thinking off.think_on.pysets no limit.Status
Our script's text (timing.py). Seen on our Mac with thinking on andnum_predict150, the Draft reply prompt (2026-10-23).What you see
curl's first byte is fast, but the answer feels slowCause
With thinking on, the first byte is thinking.Fix
Time the first non-emptymessage.contentin code.Status
In curl's docs.- curl docs, --write-out, opens in a new tabchecked 2026-10-02
Timing and counters
What you see
tokens/s like0.00000006Cause
Times are in nanoseconds.Fix
Multiply by 10^9.Status
In Ollama's docs.- Ollama API doc (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
tokens/s much lower than expectedCause
You divided bytotal_duration. It includes loading, prompt reading and waiting.Fix
Divide byeval_duration.Status
In Ollama's docs and code.- Ollama API doc (tag v0.35.0), opens in a new tabchecked 2026-10-02
- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
Line count is not equal toeval_countCause
Ollama does not promise one line per token. When the model stops on its own, its last token only marks the end, so it sends no text line. With thinking on, Ollama can also hold text back until it can split it.Fix
Count tokens witheval_count.Status
In Ollama's code. Seen on our Mac: 26 text lines foreval_count27, thinking off; 677 and 682, thinking on (2026-10-23).- Ollama llm/llama_server.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
budget_check.py: error: unrecognized arguments: for lesson 4:Cause
You pasted the labelfor lesson 4:with the numbers.Fix
Paste only the part after the colon.Status
Seen on our Mac (Python 3.14.6).What you see
TypeError [ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL]: Unexpected argument 'for'frombudget-check.mjsCause
You pasted the labelfor lesson 4:with the numbers.Fix
Paste only the part after the colon.Status
Seen on our Mac (Node v22.23.2).What you see
The first run is much slowerCause
Cold start: the model loaded on that call.Fix
One warm-up call, or report cold and warm apart.Status
In Ollama's docs.- Ollama usage doc, opens in a new tabchecked 2026-10-02
- Ollama FAQ (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
A line{"error":"..."}in the stream, while HTTP was 200Cause
The error came after the stream started.Fix
Check every line forerror(our scripts do).Status
In Ollama's code.- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
Pythonhttpx.ReadTimeout(your own code, if it uses httpx)Cause
httpx waits 5 s by default.Fix
timeout=None. All our scripts, lesson 2'sspeed.pyincluded, useurllibwith a long timeout (600 s in the practice and break it scripts and inspeed.py).Status
In httpx's docs.- httpx docs, timeouts, opens in a new tabchecked 2026-10-02
What you see
Node:SyntaxError: Unterminated string in JSON at position 66 (line 1 column 67), orExpected ',' or '}' after property value in JSONCause
JSON.parsegot half a line: a network chunk does not end at a line break.Fix
Keep a buffer, split on\n, keep the last half line.Status
Seen on our Mac, on a line we cut by hand (Node v22.23.2, 2026-10-23). The position changes with the cut.- MDN, ReadableStreamDefaultReader.read(), opens in a new tabchecked 2026-10-02
What you see
A repeat prompt has a much lower TTFT, andprompt_eval_cached_countis highCause
The prompt cache was reused.Fix
For fair tables, change the start of each prompt (our scripts add a random tag).Status
In Ollama's docs. Seen on our Mac:prompt_eval_cached_count22 of 23 whenfirst-call.shran again (2026-10-23).- Ollama usage doc, opens in a new tabchecked 2026-10-02
What you see
prompt_eval_cached_countis missingCause
Ollama leaves the field out when it has no value.Fix
Nothing to fix. Our script recordsnull.Status
In Ollama's code.- Ollama api/types.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
Practice table
What you see
Long prompt tokens are not bigger than medium, or look cutCause
The prompt is longer than the context window.Fix
Check theCONTEXTcolumn inollama ps. If the long prompt is cut, compare only the short and medium rows.Status
In Ollama's code: the default context depends on GPU memory. Seen on our Mac: 4096, with 24 GB of memory and 17.8 GiB of GPU memory in the server log (2026-10-21).- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
A measured row has a bigload msCause
The model was unloaded mid-table (5 minutes idle, or memory pressure).Fix
Rerun the script.Status
In Ollama's docs.- Ollama FAQ (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
tokens/s jumps a lot between the 3 runsCause
Other work on the machine.Fix
Close other apps, plug in power, rerun.Status
Our advice, not a measured fact.What you see
ollama psshows100% CPUCause
The model is not on the GPU.Fix
Read the server log. The top of this page says where it is.Status
In Ollama's docs.- Ollama FAQ (tag v0.35.0), opens in a new tabchecked 2026-10-02
Break it 1 (five at once)
What you see
HTTP 503server busy, please try again. maximum pending requests exceededCause
More thanOLLAMA_MAX_QUEUE(512) requests waiting for a model to load. Five requests will not do this.Fix
Send fewer at once, or raiseOLLAMA_MAX_QUEUE.Status
In Ollama's code. The two spaces are in Ollama's text.- Ollama server/sched.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
- Ollama server/routes.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
Log linemodel architecture does not currently support parallel requestsCause
You used a model family that Ollama forces to 1 slot.Fix
Useqwen3:0.6bfor this lab.Status
In Ollama's code.- Ollama server/sched.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
Break it 2 (keep_alive: 0)
What you see
ollama pslists the model, andUNTILsaysStopping...Cause
The model's time is up. Ollama unloads it when its last request ends.Fix
Wait a second and runollama psagain.Status
In Ollama's code. Seen on our Mac only with a fast poll, during akeep_alive: 0call on a cold model: from the end of loading to the reply, about 0.1 s (2026-10-23). By hand you will most likely not see it.- Ollama cmd/cmd.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
The model reloads even withoutkeep_alive: 0Cause
More than 5 minutes passed since the last call.Fix
Expected. That is the default.Status
In Ollama's docs and code.- Ollama FAQ (tag v0.35.0), opens in a new tabchecked 2026-10-02
- Ollama envconfig/config.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
What you see
load_durationis small, but the first call after a long idle is still slowCause
A developer saw this on the MLX engine (Ollama 0.34.2, M4 Pro): the wait was in reading the prompt. Ourqwen3:0.6bon v0.35.0 runs on llama.cpp, which the report says keeps the weights in place.Fix
Measure TTFT on your side, from send to the first answer word. On the MLX engine, Ollama 0.40.0 and newer have a fix.Status
Seen in a report. Not verified yet: our engine after a long idle.- Ollama issue #18744 (a developer's report), opens in a new tabchecked 2026-10-23
- Ollama commit cf6c9de, "mlx: mitigate high latency after GPU idle (#18807)", opens in a new tabchecked 2026-10-23
- Ollama server/sched.go (tag v0.35.0), opens in a new tabchecked 2026-10-02
The check page
What you see
"My answer is close but marked wrong"Cause
The band is ±5%, or the unit is wrong (ms against s).Fix
Read the unit in the question.Status
What you see
"I used my own numbers"Cause
The check uses the recorded log, not your run.Fix
Use the numbers in the log on the page.Status
Copying the scripts
What you see
first-call.sh: line 2: http://localhost:11434/api/chat: No such file or directoryCause
The file lost its line breaks when it was copied. Thecurl -Nline ended up inside the#comment above it, so the URL ran as a command.Fix
Download the file from the lesson, or copy it again with its line breaks.Status
Seen on our Mac (2026-10-21).What you see
curl: option -o: requires parameter, thenttft.sh: line 4: /dev/null: Permission deniedCause
The same: lost line breaks split the command in the wrong places.Fix
Download the file from the lesson, or copy it again with its line breaks.Status
Seen on our Mac (2026-10-21).What you see
{"error":"invalid character '}' looking for beginning of object key string"}fromfirst-call-once.shCause
A comma after the last item,"stream": false,, makes the request bad JSON.Fix
Remove the comma after"stream": false.Status
Seen on our Mac (2026-10-23). curl still exits with status 0; the server log shows 400.