Enhancing dify performance with automated log cleanup and retention #11844

Closed
opened 2026-02-21 19:04:20 -05:00 by yindo · 5 comments
Owner

Originally created by @hiwuye on GitHub (Mar 20, 2025).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

After Dify has been running for a period of time, the application logs and user logs become increasingly large, severely impacting system stability and performance. We recommend that the community enhance automated log management features, such as implementing automatic cleanup and retaining data for T days.

2. Additional context or comments

Image

Image

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @hiwuye on GitHub (Mar 20, 2025). ### Self Checks - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. After Dify has been running for a period of time, the application logs and user logs become increasingly large, severely impacting system stability and performance. We recommend that the community enhance automated log management features, such as implementing automatic cleanup and retaining data for T days. ### 2. Additional context or comments ![Image](https://github.com/user-attachments/assets/09a4a4e7-c62f-4497-9c39-5530db613e33) ![Image](https://github.com/user-attachments/assets/987d3db9-87ee-46c2-8d0b-63409b7ed087) ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 19:04:20 -05:00
yindo closed this issue 2026-02-21 19:04:20 -05:00
Author
Owner

@yangkai666666 commented on GitHub (Mar 27, 2025):

I also encountered this issue and hope that the community edition can add this automatic log cleanup feature. Currently, the logs seem to accumulate without any limits. I tried deleting the relevant databases to remove the junk logs myself, but the results were not ideal.

@yangkai666666 commented on GitHub (Mar 27, 2025): I also encountered this issue and hope that the community edition can add this automatic log cleanup feature. Currently, the logs seem to accumulate without any limits. I tried deleting the relevant databases to remove the junk logs myself, but the results were not ideal.
Author
Owner

@dosubot[bot] commented on GitHub (Apr 27, 2025):

Hi, @hiwuye. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You raised a concern about the need for automated log cleanup and retention features in Dify.
  • User yangkai666666 supported this suggestion, sharing similar experiences with log accumulation.
  • Both users advocate for automatic log management in the community edition to improve system stability and performance.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Apr 27, 2025): Hi, @hiwuye. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You raised a concern about the need for automated log cleanup and retention features in Dify. - User yangkai666666 supported this suggestion, sharing similar experiences with log accumulation. - Both users advocate for automatic log management in the community edition to improve system stability and performance. **Next Steps:** - Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting here. - If there is no further activity, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Author
Owner

@hiwuye commented on GitHub (Apr 27, 2025):

We recommend that the community enhance automated log management features

@hiwuye commented on GitHub (Apr 27, 2025): We recommend that the community enhance automated log management features
Author
Owner

@dosubot[bot] commented on GitHub (Apr 27, 2025):

@crazywoola, the user @hiwuye has indicated that the issue regarding automated log management features is still relevant and recommends community enhancement. Could you please assist them with this matter?

@dosubot[bot] commented on GitHub (Apr 27, 2025): @crazywoola, the user @hiwuye has indicated that the issue regarding automated log management features is still relevant and recommends community enhancement. Could you please assist them with this matter?
Author
Owner

@crazywoola commented on GitHub (Jul 9, 2025):

Check this file. We have several house-keeping tasks

https://github.com/langgenius/dify/blob/17fe62cf91a56f578aeff455781f933853456c02/api/commands.py

@crazywoola commented on GitHub (Jul 9, 2025): Check this file. We have several house-keeping tasks https://github.com/langgenius/dify/blob/17fe62cf91a56f578aeff455781f933853456c02/api/commands.py
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#11844