[GH-ISSUE #4854] [BUG]: #3059

Closed
opened 2026-02-22 18:32:27 -05:00 by yindo · 1 comment
Owner

Originally created by @franztaussig-rgb on GitHub (Jan 11, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4854

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Description

AnythingLLM Desktop consistently terminates all Ollama API requests after exactly 5 minutes with an HTTP 500 error, regardless of configuration attempts.

Environment

  • OS: Antix Linux (init-based, no systemd)
  • AnythingLLM Version: 1.9.1 (Desktop AppImage)
  • Ollama Version: 0.13.5
  • Ollama Host: 127.0.0.1:11434 (local)

Steps to Reproduce

  1. Start a chat request that requires >5 minutes to process
  2. Observe the request failing at exactly the 5-minute mark

Log Output

[GIN] 2026/01/11 - 08:21:56 | 500 | 5m0s | 127.0.0.1 | POST "/api/chat"

What I've Tried

All attempts to increase the timeout have failed:

Ollama Configuration (confirmed working)

  • OLLAMA_KEEP_ALIVE=24h - verified in Ollama server config
  • OLLAMA_LOAD_TIMEOUT=15m - verified in Ollama server config
  • Direct curl requests to Ollama work beyond 5 minutes

AnythingLLM Configuration Attempts

  • Environment variables at AppImage launch: LLM_TIMEOUT=900000, REQUEST_TIMEOUT=900000, OLLAMA_TIMEOUT=900000
  • Modified Ollama base URL to use a socat proxy with extended timeout (-T600)
  • Searched AppImage contents (app.asar, backend/server.js, dist-electron/) - no configurable timeout found

Expected Behavior

Timeout should be configurable or at least respect longer timeouts (15+ minutes) for complex requests.

Actual Behavior

All requests terminate at exactly 300 seconds (5 minutes) regardless of configuration.

Additional Context

The 5-minute timeout appears to be hard-coded somewhere in the Electron app or backend, likely in:

  • The Ollama provider implementation
  • An HTTP client configuration (axios/fetch)
  • IPC communication between frontend and backend

This makes AnythingLLM unusable for longer-running tasks with local models.

Possible Solution

Add a user-configurable timeout setting in the UI or .env file, or increase the default to at least 15-30 minutes for LLM providers.

Are there known steps to reproduce?

No response

Originally created by @franztaussig-rgb on GitHub (Jan 11, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4854 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? ## Description AnythingLLM Desktop consistently terminates all Ollama API requests after exactly 5 minutes with an HTTP 500 error, regardless of configuration attempts. ## Environment - **OS:** Antix Linux (init-based, no systemd) - **AnythingLLM Version:** 1.9.1 (Desktop AppImage) - **Ollama Version:** 0.13.5 - **Ollama Host:** 127.0.0.1:11434 (local) ## Steps to Reproduce 1. Start a chat request that requires >5 minutes to process 2. Observe the request failing at exactly the 5-minute mark ## Log Output ``` [GIN] 2026/01/11 - 08:21:56 | 500 | 5m0s | 127.0.0.1 | POST "/api/chat" ``` ## What I've Tried All attempts to increase the timeout have failed: ### Ollama Configuration (confirmed working) - ✅ `OLLAMA_KEEP_ALIVE=24h` - verified in Ollama server config - ✅ `OLLAMA_LOAD_TIMEOUT=15m` - verified in Ollama server config - ✅ Direct `curl` requests to Ollama work beyond 5 minutes ### AnythingLLM Configuration Attempts - ❌ Environment variables at AppImage launch: `LLM_TIMEOUT=900000`, `REQUEST_TIMEOUT=900000`, `OLLAMA_TIMEOUT=900000` - ❌ Modified Ollama base URL to use a `socat` proxy with extended timeout (`-T600`) - ❌ Searched AppImage contents (`app.asar`, `backend/server.js`, `dist-electron/`) - no configurable timeout found ## Expected Behavior Timeout should be configurable or at least respect longer timeouts (15+ minutes) for complex requests. ## Actual Behavior All requests terminate at exactly 300 seconds (5 minutes) regardless of configuration. ## Additional Context The 5-minute timeout appears to be hard-coded somewhere in the Electron app or backend, likely in: - The Ollama provider implementation - An HTTP client configuration (axios/fetch) - IPC communication between frontend and backend This makes AnythingLLM unusable for longer-running tasks with local models. ## Possible Solution Add a user-configurable timeout setting in the UI or `.env` file, or increase the default to at least 15-30 minutes for LLM providers. ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:32:27 -05:00
yindo closed this issue 2026-02-22 18:32:27 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jan 12, 2026):

The 5-minute timeout appears to be hard-coded somewhere in the Electron app or backend, likely in:

The default NodeJS timeout is exactly 300 seconds. We added an ENV control for this
https://github.com/Mintplex-Labs/anything-llm/blob/7c3b7906e798314a4aeb5be38b42a1a29599e381/server/utils/AiProviders/ollama/index.js#L137

This ENV (you can set by editing the desktop storage .env manually) will persist this value so you dont get timeouts or at least get them within your personal expectations. Being able to set this from the UI is an improvement we should consider though.

@timothycarambat commented on GitHub (Jan 12, 2026): > The 5-minute timeout appears to be hard-coded somewhere in the Electron app or backend, likely in: The default NodeJS timeout is exactly 300 seconds. We added an ENV control for this https://github.com/Mintplex-Labs/anything-llm/blob/7c3b7906e798314a4aeb5be38b42a1a29599e381/server/utils/AiProviders/ollama/index.js#L137 This ENV (you can set by editing the desktop storage .env manually) will persist this value so you dont get timeouts or at least get them within your personal expectations. Being able to set this from the UI is an improvement we should consider though.
yindo changed title from [BUG]: to [GH-ISSUE #4854] [BUG]: 2026-06-05 14:50:04 -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#3059