{"error":"server busy, please try again. maximum pending requests exceeded"} with HTTP 503 means more requests reached the Ollama server at once than its OLLAMA_MAX_QUEUE setting lets wait. Raise or unset OLLAMA_MAX_QUEUE on the server, or send fewer requests at a time and retry the 503s.

In the test, a server started with OLLAMA_MAX_QUEUE=1 and OLLAMA_NUM_PARALLEL=1 refused four of six simultaneous requests. The same six requests against a server started without OLLAMA_MAX_QUEUE all returned 200; its log showed OLLAMA_MAX_QUEUE:512.

The error

Six curl.exe processes started together against the test server on port 15191, each with the same body:

{"model":"qwen2.5:0.5b","prompt":"Write a 200-word story about a lighthouse.","stream":false,"options":{"num_predict":200}}
PS> 1..6 | ForEach-Object { Start-Process curl.exe -ArgumentList "-s -i -o r$_.txt -d @busy.json http://127.0.0.1:15191/api/generate" -WindowStyle Hidden -PassThru } | Wait-Process
PS> 1..6 | ForEach-Object { "r$_.txt: " + (Get-Content "r$_.txt")[0] + " " + (Get-Content "r$_.txt")[-1].Substring(0, 60) }
r1.txt: HTTP/1.1 200 OK {"model":"qwen2.5:0.5b","created_at":"2026-11-10T03:24:58.76
r2.txt: HTTP/1.1 503 Service Unavailable {"error":"server busy, please try again.  maximum pending re
r3.txt: HTTP/1.1 503 Service Unavailable {"error":"server busy, please try again.  maximum pending re
r4.txt: HTTP/1.1 200 OK {"model":"qwen2.5:0.5b","created_at":"2026-11-10T03:24:58.31
r5.txt: HTTP/1.1 503 Service Unavailable {"error":"server busy, please try again.  maximum pending re
r6.txt: HTTP/1.1 503 Service Unavailable {"error":"server busy, please try again.  maximum pending re
PS> Get-Content r6.txt
HTTP/1.1 503 Service Unavailable
Content-Type: application/json; charset=utf-8
Date: Tue, 10 Nov 2026 03:24:56 GMT
Content-Length: 77

{"error":"server busy, please try again.  maximum pending requests exceeded"}

The message has two spaces after "again." as the server sends it.

Why it happens

The server's start-up log prints its settings on a server config line. For the failing server it read OLLAMA_MAX_QUEUE:1 OLLAMA_NUM_PARALLEL:1. The refused requests did not wait for the others: r6.txt's 503 is dated 03:24:56, and the two 200 answers were created at 03:24:58.

The result depends on timing. Each failing run started a fresh server with the model not yet loaded. Once the model was loaded, the same six requests against a server with OLLAMA_MAX_QUEUE=1 all returned 200, and a fresh server with OLLAMA_MAX_QUEUE=4 refused one of six. So the error came and went with timing in the test, with the same setting.

The fix

Start the server without OLLAMA_MAX_QUEUE (or with a value large enough for your peak), then restart it. The same six requests, fresh server, model not loaded:

PS> 1..6 | ForEach-Object { Start-Process curl.exe -ArgumentList "-s -i -o r$_.txt -d @busy.json http://127.0.0.1:15191/api/generate" -WindowStyle Hidden -PassThru } | Wait-Process
PS> 1..6 | ForEach-Object { "r$_.txt: " + (Get-Content "r$_.txt")[0] + " " + (Get-Content "r$_.txt")[-1].Substring(0, 60) }
r1.txt: HTTP/1.1 200 OK {"model":"qwen2.5:0.5b","created_at":"2026-11-10T03:25:07.45
r2.txt: HTTP/1.1 200 OK {"model":"qwen2.5:0.5b","created_at":"2026-11-10T03:25:06.99
r3.txt: HTTP/1.1 200 OK {"model":"qwen2.5:0.5b","created_at":"2026-11-10T03:25:08.60
r4.txt: HTTP/1.1 200 OK {"model":"qwen2.5:0.5b","created_at":"2026-11-10T03:25:06.55
r5.txt: HTTP/1.1 200 OK {"model":"qwen2.5:0.5b","created_at":"2026-11-10T03:25:08.14
r6.txt: HTTP/1.1 200 OK {"model":"qwen2.5:0.5b","created_at":"2026-11-10T03:25:07.69

That server's log line read OLLAMA_MAX_QUEUE:512 OLLAMA_NUM_PARALLEL:1. On a server you do not control, treat 503 as "try later": the client can wait a moment and send the request again, or limit how many requests it has open at once. Look at the server config line in the log first to see which values the server is really running with.

How it was reproduced

Ollama 0.40.14 (ollama --version) on Windows 11, run as a separate ollama serve on 127.0.0.1:15191 with its own models folder and qwen2.5:0.5b, started with Start-Process and the two variables set in that process's environment only. Each run restarted the server; the six requests were curl.exe processes started from Windows PowerShell 5.1 with an ASCII body file and num_predict 200.

Frequently asked

What does Ollama server busy, please try again mean?
The server refused the request with HTTP 503 because more requests were waiting than OLLAMA_MAX_QUEUE allows. In the test OLLAMA_MAX_QUEUE=1 refused four of six simultaneous requests.
How do I fix maximum pending requests exceeded in Ollama?
Raise OLLAMA_MAX_QUEUE or leave it unset and restart the server, or send fewer requests at once and retry the 503s. Unset, the test server's log showed OLLAMA_MAX_QUEUE:512 and all six requests returned 200.
How do I see the OLLAMA_MAX_QUEUE value the server uses?
Read the server config line that ollama serve writes to its log at start-up. It lists OLLAMA_MAX_QUEUE and OLLAMA_NUM_PARALLEL with the values in effect.

More decoded errors in the Fixes category. Every endpoint used here is in the Ollama API guide.