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

  1. What you see

    curl: (7) Failed to connect to localhost port 11434 after 0 ms: Couldn't connect to server

    Cause

    Nothing is running at port 11434.

    Fix

    Open the Ollama app, or run ollama serve.

    Status

    Seen on our Mac (curl 8.7.1).
  2. What you see

    Our Python scripts: Cannot reach Ollama at http://127.0.0.1:11434. Is it running? [Errno 61] Connection refused

    Cause

    Nothing is running at port 11434.

    Fix

    Open the Ollama app, or run ollama serve.

    Status

    The [Errno 61] Connection refused part: seen on our Mac (Python 3.14.6, URLError). The first part is our script's text (timing.py).
  3. What you see

    Node: TypeError: fetch failed, cause ECONNREFUSED

    Cause

    Nothing is running at port 11434.

    Fix

    Open the Ollama app, or run ollama serve.

    Status

    Seen on our Mac (Node v22.23.2).
  4. What you see

    Node: ReferenceError: fetch is not defined

    Cause

    This Node has no built-in fetch. Our .mjs scripts need Node 18 or newer.

    Fix

    Install Node 18 or newer. node -v shows yours.

    Status

    Seen on our Mac (Node v16.20.2, 2026-10-23).
  5. What you see

    Error: listen tcp 127.0.0.1:11434: bind: address already in use after ollama serve

    Cause

    The Ollama app already runs the server on port 11434, and the serve command stops at its listen step.

    Fix

    Do not run ollama serve while 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).
  6. What you see

    The Mac installer will not run

    Cause

    Ollama on macOS needs macOS 14 (Sonoma) or newer.

    Fix

    Update macOS to version 14 or newer.

    Status

    In Ollama's docs.

Model

  1. 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 check ollama list.

    Status

    In Ollama's code. Seen on our Mac: curl, speed.mjs, speed.py and practice_table.py all printed this one before the pull (2026-10-23).
  2. What you see

    HTTP 404 model "qwen3:1.7b" not found, try pulling it first

    Cause

    Same, found at another step.

    Fix

    ollama pull qwen3:1.7b, then check ollama list.

    Status

    In Ollama's code. None of our four tries printed it.
  3. What you see

    practice_table.py stops after the 0.6b rows with HTTP 404, and no table file appears

    Cause

    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).
  4. What you see

    You used qwen3:4b and it thinks, even with "think": false

    Cause

    That tag is a thinking-only build: ollama show qwen3:4b lists thinking levels true only. Its thinking and a closing </think> mark come back inside message.content.

    Fix

    Use qwen3:1.7b for the bigger model.

    Status

    Seen on our Mac (Ollama 0.35.0, 2026-10-23).

Thinking

  1. What you see

    TTFT is many seconds and message.content stays empty for a long time

    Cause

    think was left out. v0.35.0 turns thinking on for qwen3.

    Fix

    Send "think": false.

    Status

    In Ollama's code. Seen on our Mac: lesson 3's two runs with no think field both came back with thinking (2026-10-23).
  2. What you see

    HTTP 400 "<model>" does not support thinking

    Cause

    think: true sent to a model that cannot think.

    Fix

    Use qwen3:0.6b, or drop think for that model.

    Status

    In Ollama's code.
  3. 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

    Raise num_predict, or turn thinking off. think_on.py sets no limit.

    Status

    Our script's text (timing.py). Seen on our Mac with thinking on and num_predict 150, the Draft reply prompt (2026-10-23).
  4. What you see

    curl's first byte is fast, but the answer feels slow

    Cause

    With thinking on, the first byte is thinking.

    Fix

    Time the first non-empty message.content in code.

    Status

    In curl's docs.

Timing and counters

  1. What you see

    tokens/s like 0.00000006

    Cause

    Times are in nanoseconds.

    Fix

    Multiply by 10^9.

    Status

    In Ollama's docs.
  2. What you see

    tokens/s much lower than expected

    Cause

    You divided by total_duration. It includes loading, prompt reading and waiting.

    Fix

    Divide by eval_duration.

    Status

    In Ollama's docs and code.
  3. What you see

    Line count is not equal to eval_count

    Cause

    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 with eval_count.

    Status

    In Ollama's code. Seen on our Mac: 26 text lines for eval_count 27, thinking off; 677 and 682, thinking on (2026-10-23).
  4. What you see

    budget_check.py: error: unrecognized arguments: for lesson 4:

    Cause

    You pasted the label for lesson 4: with the numbers.

    Fix

    Paste only the part after the colon.

    Status

    Seen on our Mac (Python 3.14.6).
  5. What you see

    TypeError [ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL]: Unexpected argument 'for' from budget-check.mjs

    Cause

    You pasted the label for lesson 4: with the numbers.

    Fix

    Paste only the part after the colon.

    Status

    Seen on our Mac (Node v22.23.2).
  6. What you see

    The first run is much slower

    Cause

    Cold start: the model loaded on that call.

    Fix

    One warm-up call, or report cold and warm apart.

    Status

    In Ollama's docs.
  7. What you see

    A line {"error":"..."} in the stream, while HTTP was 200

    Cause

    The error came after the stream started.

    Fix

    Check every line for error (our scripts do).

    Status

    In Ollama's code.
  8. What you see

    Python httpx.ReadTimeout (your own code, if it uses httpx)

    Cause

    httpx waits 5 s by default.

    Fix

    timeout=None. All our scripts, lesson 2's speed.py included, use urllib with a long timeout (600 s in the practice and break it scripts and in speed.py).

    Status

    In httpx's docs.
  9. What you see

    Node: SyntaxError: Unterminated string in JSON at position 66 (line 1 column 67), or Expected ',' or '}' after property value in JSON

    Cause

    JSON.parse got 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.
  10. What you see

    A repeat prompt has a much lower TTFT, and prompt_eval_cached_count is high

    Cause

    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_count 22 of 23 when first-call.sh ran again (2026-10-23).
  11. What you see

    prompt_eval_cached_count is missing

    Cause

    Ollama leaves the field out when it has no value.

    Fix

    Nothing to fix. Our script records null.

    Status

    In Ollama's code.

Practice table

  1. What you see

    Long prompt tokens are not bigger than medium, or look cut

    Cause

    The prompt is longer than the context window.

    Fix

    Check the CONTEXT column in ollama 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).
  2. What you see

    A measured row has a big load ms

    Cause

    The model was unloaded mid-table (5 minutes idle, or memory pressure).

    Fix

    Rerun the script.

    Status

    In Ollama's docs.
  3. What you see

    tokens/s jumps a lot between the 3 runs

    Cause

    Other work on the machine.

    Fix

    Close other apps, plug in power, rerun.

    Status

    Our advice, not a measured fact.
  4. What you see

    ollama ps shows 100% CPU

    Cause

    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.

Break it 1 (five at once)

  1. What you see

    HTTP 503 server busy, please try again. maximum pending requests exceeded

    Cause

    More than OLLAMA_MAX_QUEUE (512) requests waiting for a model to load. Five requests will not do this.

    Fix

    Send fewer at once, or raise OLLAMA_MAX_QUEUE.

    Status

    In Ollama's code. The two spaces are in Ollama's text.
  2. What you see

    Log line model architecture does not currently support parallel requests

    Cause

    You used a model family that Ollama forces to 1 slot.

    Fix

    Use qwen3:0.6b for this lab.

    Status

    In Ollama's code.

Break it 2 (keep_alive: 0)

  1. What you see

    ollama ps lists the model, and UNTIL says Stopping...

    Cause

    The model's time is up. Ollama unloads it when its last request ends.

    Fix

    Wait a second and run ollama ps again.

    Status

    In Ollama's code. Seen on our Mac only with a fast poll, during a keep_alive: 0 call 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.
  2. What you see

    The model reloads even without keep_alive: 0

    Cause

    More than 5 minutes passed since the last call.

    Fix

    Expected. That is the default.

    Status

    In Ollama's docs and code.
  3. What you see

    load_duration is small, but the first call after a long idle is still slow

    Cause

    A developer saw this on the MLX engine (Ollama 0.34.2, M4 Pro): the wait was in reading the prompt. Our qwen3:0.6b on 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.

The check page

  1. 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

  2. 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

  1. What you see

    first-call.sh: line 2: http://localhost:11434/api/chat: No such file or directory

    Cause

    The file lost its line breaks when it was copied. The curl -N line 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).
  2. What you see

    curl: option -o: requires parameter, then ttft.sh: line 4: /dev/null: Permission denied

    Cause

    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).
  3. What you see

    {"error":"invalid character '}' looking for beginning of object key string"} from first-call-once.sh

    Cause

    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.