[GH-ISSUE #186] Error on large contexts & memory usage #46585

Closed
opened 2026-04-27 23:06:22 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @jmorganca on GitHub (Jul 23, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/186

When having a "long" conversation and an increasing context window, ollama run will sometimes report an error:

"http://127.0.0.1:11434/api/generate": EOF" 

This also may occur if there is insufficient memory. Ollama should handle these cases gracefully.

Originally created by @jmorganca on GitHub (Jul 23, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/186 When having a "long" conversation and an increasing context window, `ollama run` will sometimes report an error: ``` "http://127.0.0.1:11434/api/generate": EOF" ``` This also may occur if there is insufficient memory. Ollama should handle these cases gracefully.
GiteaMirror added the bug label 2026-04-27 23:06:22 -05:00
Author
Owner

@andrewblount commented on GitHub (Jul 30, 2023):

Hello. I get the error anytime I go over ~1200 tokens, regardless of the model. num_ctx is set to 4096. I'm on an M2 Mac with 96 GB memory and 64 GB free. It occurs both via the command line and HTTP. Thanks. Otherwise, your product is wonderful. Excellent work.

<!-- gh-comment-id:1657041999 --> @andrewblount commented on GitHub (Jul 30, 2023): Hello. I get the error anytime I go over ~1200 tokens, regardless of the model. num_ctx is set to 4096. I'm on an M2 Mac with 96 GB memory and 64 GB free. It occurs both via the command line and HTTP. Thanks. Otherwise, your product is wonderful. Excellent work.
Author
Owner

@mxyng commented on GitHub (Aug 2, 2023):

There are a lot of stability improvements release in the upcoming release which should address this and other Post "http://127.0.0.1:11434/api/generate": EOF issues

<!-- gh-comment-id:1662816609 --> @mxyng commented on GitHub (Aug 2, 2023): There are a lot of stability improvements release in the upcoming release which should address this and other `Post "http://127.0.0.1:11434/api/generate": EOF` issues
Author
Owner

@jmorganca commented on GitHub (Aug 9, 2023):

These errors should be gone (or at least far better) as of 0.13 – will close this for now but do feel free to re-open if it happens again!

<!-- gh-comment-id:1670627279 --> @jmorganca commented on GitHub (Aug 9, 2023): These errors should be gone (or at least far better) as of [0.13](https://ollama.ai/download) – will close this for now but do feel free to re-open if it happens again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#46585