The message
Error: model requires more system memory (42.8 GiB) than is available (12.9 GiB)
Affects: Ollama, Open WebUI
Why is this happening?
Before loading, Ollama estimates how much memory the model plus context buffer needs. The context buffer grows with the configured context length, so even a medium-sized model can fail if a program (for example, a frontend) requests a very large context. Other loaded models and open programs also use memory.
How to fix it
- Compare the two numbers in the message. If the required amount is far above the available memory, the model is simply too large: choose a smaller parameter size (for example, 8b instead of 70b) or stronger quantization.
- Lower the context length. In the terminal: in
ollama run, enter the command/set parameter num_ctx 4096. In Open WebUI: Chat-Steuerung → Advanced Parameters → reducenum_ctxor leave it completely blank. - Unload other models with
ollama stop <modellname>and useollama psto check that nothing else is loaded anymore. - Close memory-hungry programs (games, browsers with many tabs, image generators) and try again.
- Optional: Halve the context memory usage by setting the environment variable
OLLAMA_KV_CACHE_TYPEtoq8_0and restarting Ollama. This only works if Flash Attention is enabled.
Better not: Making the Windows paging file huge hardly helps: even if the model loads then, it will be unusably slow.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Your own ChatGPT with Ollama and Open WebUI
Run a language model locally on Windows - with the Ollama app, suitable models for 8 to 24 GB, context length, command line, and Open WebUI… - Chat with your own documents (AnythingLLM)
Set up AnythingLLM Desktop on Windows, load PDFs into a workspace, and ask questions locally — with sources and privacy. - VRAM explained: why it decides everything
How much VRAM does local AI need? Rule of thumb, quantization (Q4, Q8, fp8), context, image and video models, offloading, and which card si…
Terms for this
Similar errors
- Open WebUI: Ollama: 500, message='Internal Server Error' (Ollama reached, but model cannot respond)
- Model forgets the beginning or ignores long texts (context length too small)
- Ollama: POST predict … /completion: EOF / wsarecv: An existing connection was forcibly closed by the remote host (model process crashed in the middle of the response)
- Confusing answers, endless loops, or tags like <|im_end|> (wrong chat template)
- Docker Desktop: WSL needs updating / WSL 2 installation is incomplete
Sources
- https://github.com/ollama/ollama/issues/10181
- https://github.com/ollama/ollama/issues/10256
- https://docs.ollama.com/faq
- https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-ollama.md
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.