mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-07-22 04:15:24 -04:00
Serious Issue: Frequent and Critical Loss of Chat History/Logs #266
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @m-masahiro-addness on GitHub (Nov 9, 2025).
Type of Documentation Change
Error/Typo fix
Documentation Page URL or Path
No response
Current Content
We are reporting a serious and critical issue regarding the stability and reliability of the Dify platform.
We are observing that the chat history/logs are disappearing with significant frequency. This is not an isolated or rare event; it is happening consistently enough to severely impact our operation and ability to track user interactions and model performance.
Key Concerns:
Data Loss: The disappearance of history represents a critical loss of operational data and diagnostic information.
Operational Instability: The platform's perceived reliability is undermined, making it difficult to trust the system for long-term data storage.
Difficulty in Debugging/Monitoring: Without reliable logs, it is nearly impossible for us to monitor model behavior, debug issues, or conduct necessary audits.
This issue is occurring quite frequently (or "at a quite high frequency") and needs to be addressed with high priority and urgency. We request an immediate investigation into the root cause of this frequent data loss.
Suggested Changes
Suggested Changes / Requested Actions
Reason for Change
Reason for Reporting / Impact of the Issue
This issue must be treated as a high-priority incident due to the following critical impacts:
Code of Conduct
@dosubot[bot] commented on GitHub (Nov 9, 2025):
Hi @m-masahiro-addness! I'm Dosu and I’m helping the dify-docs team.
Your report highlights a critical issue with chat history/log loss in Dify. Based on a deep review of the codebase and related issues, chat history is stored in the database (
conversationsandmessagestables), and deletion is user-driven—there are no automated cleanup scripts or retention policies that would periodically remove chat logs unless manually triggered or misconfigured by an administrator. Immediate database commits are used for write operations, but there is no explicit backend verification step or enhanced logging for chat history creation events—logging is only present for deletion operations, which could make it difficult to pinpoint the cause of silent data loss or failed writes see code see code.There are no recent fixes or features addressing frequent chat history disappearance, and related issues focus on privacy, retention, and operational bugs rather than persistent data loss see related issue. Some platform-specific bugs (e.g., changing user IDs on iOS/macOS) can make chat logs inaccessible but do not delete the underlying data see related issue.
To address your concerns, I recommend: auditing all database write and delete operations for chat history, reviewing any custom scripts or cron jobs that might affect retention, and increasing server-side logging for both creation and deletion events. Implementing a backend verification step after each chat log write would help confirm persistence and catch silent failures. If you have specific timestamps or logs, sharing them could help correlate frontend events with backend operations and identify root causes.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
