ragflow/api/apps
dzikus 9a8ce9d3e2
fix: increase Quart RESPONSE_TIMEOUT and BODY_TIMEOUT for slow LLM responses (#11612)
### What problem does this PR solve?

Quart framework has default RESPONSE_TIMEOUT and BODY_TIMEOUT of 60
seconds.
This causes the frontend chat to hang exactly after 60 seconds when
using
slow LLM backends (e.g., Ollama on CPU, or remote APIs with high
latency).

This fix adds configurable timeout settings via environment variables
with
sensible defaults (600 seconds = 10 minutes) to match other timeout
configurations in RAGFlow.

Fixes issues with chat timeout when:
- Using local Ollama on CPU (response time ~2 minutes)
- Using remote LLM APIs with high latency
- Processing complex RAG queries with many chunks

### Type of change

- [X] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: Grzegorz Sterniczuk <grzegorz@sternicz.uk>
2025-12-01 11:26:34 +08:00
..
auth Admin: add 'show version' (#11079) 2025-11-06 19:24:46 +08:00
sdk [issue-11572]fix:metadata_condition filtering failed (#11573) 2025-11-28 14:04:14 +08:00
__init__.py fix: increase Quart RESPONSE_TIMEOUT and BODY_TIMEOUT for slow LLM responses (#11612) 2025-12-01 11:26:34 +08:00
api_app.py Refactor /stats API (#11363) 2025-11-19 12:27:45 +08:00
canvas_app.py Feat: add child parent chunking method in backend. (#11598) 2025-11-28 19:25:32 +08:00
chunk_app.py Fix: no result if metadata returns none. (#11412) 2025-11-20 19:51:25 +08:00
connector_app.py Feat: add gmail connector (#11549) 2025-11-28 13:09:40 +08:00
conversation_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
dialog_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
document_app.py Feat: add child parent chunking method in backend. (#11598) 2025-11-28 19:25:32 +08:00
file2document_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
file_app.py Fix: coroutine object has no attribute get (#11472) 2025-11-24 12:21:33 +08:00
kb_app.py Fix: refine error msg. (#11380) 2025-11-19 19:10:45 +08:00
langfuse_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
llm_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
mcp_server_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
plugin_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
search_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
system_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
tenant_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
user_app.py Feat: add gmail connector (#11549) 2025-11-28 13:09:40 +08:00