[GH-ISSUE #1585] [CHORE]: Increase Ollama timeout #1027

Closed
opened 2026-02-22 18:22:45 -05:00 by yindo · 4 comments
Owner

Originally created by @Nathan8489 on GitHub (May 31, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1585

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

Docker (local)

What happened?

os: linux
version: mintplexlabs/anythingllm@sha256:1d994f027b5519d4bc5e1299892e7d0be1405308f10d0350ecefc8e717d3154f (latest version before lancedb dep bump )

problem from: server/utils/EmbeddingEngines/ollama/index.js

The function embedChunks tries to send all text chunks in one connection. However, if all fetches cannot complete within 5 minutes, something (possibly Node.js) determines that the connection has timed out and terminates it, causing it to fail.

I temporarily resolved this by awaiting each chunk fetch individually (40 seconds per chunk, 8192 tokens).

Are there known steps to reproduce?

  • Get a really slow Ollama service (CPU).
  • Set the embedding provider to Ollama.
  • Try to move a large document to the workspace.
  • Wait for the embedding process...
  • It failed exactly after 5 minutes.
Originally created by @Nathan8489 on GitHub (May 31, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1585 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? Docker (local) ### What happened? os: linux version: `mintplexlabs/anythingllm@sha256:1d994f027b5519d4bc5e1299892e7d0be1405308f10d0350ecefc8e717d3154f` (latest version before lancedb dep bump ) problem from: `server/utils/EmbeddingEngines/ollama/index.js` The function `embedChunks` tries to send all text chunks in one connection. However, if all fetches cannot complete within 5 minutes, something (possibly Node.js) determines that the connection has timed out and terminates it, causing it to fail. I temporarily resolved this by awaiting each chunk fetch individually (40 seconds per chunk, 8192 tokens). ### Are there known steps to reproduce? - Get a really slow Ollama service (CPU). - Set the embedding provider to Ollama. - Try to move a large document to the workspace. - Wait for the embedding process... - It failed exactly after 5 minutes.
yindo added the enhancement label 2026-02-22 18:22:45 -05:00
yindo closed this issue 2026-02-22 18:22:45 -05:00
Author
Owner

@mingLvft commented on GitHub (Jun 5, 2024):

Has the problem been solved?

@mingLvft commented on GitHub (Jun 5, 2024): Has the problem been solved?
Author
Owner

@timothycarambat commented on GitHub (Jun 6, 2024):

There is no PR and the issue is open - so no.

@timothycarambat commented on GitHub (Jun 6, 2024): There is no PR and the issue is open - so no.
Author
Owner

@travisgu commented on GitHub (Jun 17, 2024):

I encountered same issue. The Ollama service returned 500 error at exact 5 mintues because the http request was cancelled. So it can only embedding small PDF files.

Is there any config file I can increase the timeout limit?

@travisgu commented on GitHub (Jun 17, 2024): I encountered same issue. The Ollama service returned 500 error at exact 5 mintues because the http request was cancelled. So it can only embedding small PDF files. Is there any config file I can increase the timeout limit?
Author
Owner

@timothycarambat commented on GitHub (Jul 19, 2024):

Moving conversation to #1585

@timothycarambat commented on GitHub (Jul 19, 2024): Moving conversation to #1585
yindo changed title from [CHORE]: Increase Ollama timeout to [GH-ISSUE #1585] [CHORE]: Increase Ollama timeout 2026-06-05 14:38:33 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1027