Replies: 1 comment
-
|
This is a known issue affecting Dify versions v1.8.1 through v1.14.x. The timeout parameters you've configured are correct but they're not the root cause of the frontend disconnection — Dify's default nginx timeouts are already set to 1 hour (3600s) [1], so your adjustments should have been sufficient from a timeout perspective. The actual root cause is a race condition in Dify's SSE (Server-Sent Events) architecture involving Redis Pub/Sub. Events published by Celery workers can be lost if they arrive before the API server completes its Redis subscription, causing the frontend to lose its connection and reset to the initial conversation page — while the backend continues running normally [2]. Workarounds to try:
To answer your questions directly:
To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
Title
Long-running conversation workflow frontend output disappears, but backend still running (adjusted timeout parameters not working)
Body
When running a long-time conversation workflow (about 10 minutes), the frontend output suddenly disappears and returns to the initial conversation page, but the workflow is still executing in the backend normally.
I have already adjusted the following timeout parameters in .env and docker-compose.yaml and restarted the service, but the issue still persists:
plaintext
TEXT_GENERATION_TIMEOUT_MS=1200000
GUNICORN_TIMEOUT=1800
WORKFLOW_MAX_EXECUTION_TIME=1800
MODEL_REQUEST_TIMEOUT=1800
PLUGIN_DAEMON_TIMEOUT=1800
Environment
Dify version: 1.14.1
Deployment: Docker Compose
Browser: Chrome / Edge
Behavior
Start a long-running conversation workflow in the chat page
After a few minutes (even with continuous output), frontend output disappears
Frontend automatically returns to the new conversation page
Backend workflow continues to run and completes successfully
Questions
Is this a bug or expected behavior?
Why do the timeout parameters not prevent frontend disconnection?
Is there any official solution to keep the connection alive when the tab is in the background or idle?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions