After the workflow is completed, the output content is reset to blank
Self Checks
- [x] I have read the Contributing Guide and Language Policy.
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.7.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
After a workflow is completed normally, everything is normal. After waiting for 30 minutes and returning to the page, you will find that the output has been reset to blank.
✔️ Expected Behavior
After a workflow is completed normally, as long as it is not closed or refreshed, the output should be retained indefinitely
❌ Actual Behavior
After a workflow is completed normally, wait for 30 minutes and the output content will be blank (as if the page has been refreshed)
This issue is most likely caused by session expiration or cache policies in your self-hosted Dify setup. Workflow output is managed in frontend memory and fetched from the backend; if the session expires or cache is cleared, the output can appear blank even if the page wasn't refreshed.
You can adjust environment variables in your .env or Docker Compose setup to extend retention: look for SESSION_EXPIRE_HOURS, REDIS_CACHE_TTL, and WORKFLOW_NODE_OUTPUT_TTL. Increasing these values should help keep workflow output visible for longer periods. After making changes, restart your Docker containers for the new settings to take effect. Timeout settings for workflow execution (like APP_MAX_EXECUTION_TIME and WORKFLOW_MAX_EXECUTION_TIME) can also be configured if needed. For more details, see this discussion.
If you continue to see this issue, check your logs for session or cache expiration events, and confirm your browser isn't clearing state due to inactivity.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Today's continued testing found that it is not a workflow issue. As long as you switch back to the Dify tab at regular intervals, the page will be refreshed (At the same time, other tabs do not have such issues).
I have also encountered this problem. Do you have a solution now?
The application's client-side state is being incorrectly synchronized or reset when switching between browser tabs or after a period of inactivity. This leads to data loss and inconsistent states across different parts of the application, such as the Explore page and the Studio editor.
here are the documented scenarios:
Scenario 1: Explore Page State Corruption
- Action: Open multiple browser tabs, each with a different application active on the "Explore" page.
- Action: Navigate to a new, unrelated tab and remain there for 5-10 minutes.
- Action: Return to any of the previous "Explore" tabs.
- Actual Result: All "Explore" tabs refresh and incorrectly display the state of the last application viewed before the user switched away.
- Expected Result: Each tab should persist its own independent state.
Scenario 2: Studio Editor Data Loss
- Action: Open a workflow in the Studio editor.
- Action: Enter the configuration panel for any Node and input some data (without explicitly saving).
- Action: Switch to a different browser tab.
- Action: Return to the Studio editor tab.
- Actual Result: The unsaved configuration changes made in the Node are lost.
- Expected Result: The unsaved changes should remain in the local state of the editor.
It seems a mechanism (likely using localStorage to sync state across tabs) is attempting to re-sync the state when a tab becomes active. However, if this synchronization fails or encounters an edge case, instead of gracefully preserving the existing local state, it appears to be either:
a) Deleting the local state, forcing a hard reset. b) Incorrectly overwriting the tab's state with a stale or incorrect state from another tab.
Hi, @kuku-jiusgan. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.
Issue Summary
- You reported that in self-hosted Dify v1.7.2 (Docker), workflow output resets to blank after about 30 minutes of inactivity without a page refresh.
- Switching browser tabs appears to trigger a page refresh, causing loss of workflow output.
- Initial suggestions pointed to session expiration or cache TTL settings (e.g., SESSION_EXPIRE_HOURS, WORKFLOW_NODE_OUTPUT_TTL).
- Further investigation revealed client-side state synchronization across tabs is flawed, likely due to localStorage sync issues.
- Other users have also experienced this problem and are looking for a fix.
Next Steps
- Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open.
- Otherwise, this issue will be automatically closed in 15 days.
Thank you for your understanding and contribution!