memory 100% #12472

Closed
opened 2026-02-21 19:07:35 -05:00 by yindo · 2 comments
Owner

Originally created by @Dong09 on GitHub (Apr 2, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • 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.

Dify version

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I download a plugin or create a knowledge base on dedify, the memory footprint goes to 100% and when restarting docker, the previously downloaded plugins and created knowledge bases and chatflows are cleared out

✔️ Expected Behavior

No response

Actual Behavior

Image

Originally created by @Dong09 on GitHub (Apr 2, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [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. ### Dify version 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When I download a plugin or create a knowledge base on dedify, the memory footprint goes to 100% and when restarting docker, the previously downloaded plugins and created knowledge bases and chatflows are cleared out ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior ![Image](https://github.com/user-attachments/assets/7756fc56-8a57-4d4f-bd05-ec7c27b049ef)
yindo added the 🐞 bug label 2026-02-21 19:07:35 -05:00
yindo closed this issue 2026-02-21 19:07:35 -05:00
Author
Owner

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

Hey @Dong09! 👋 I'm here to assist you with bug fixes, answer your questions, and help you become a contributor. Let's tackle this issue together!

I found a similar unsolved discussion regarding abnormal disk usage after upgrading to version 1.0.0, where the disk size keeps increasing rapidly even without actual use [1]. Additionally, there is a closed issue about the knowledge base frequently disappearing, which was resolved by a pull request that fixed an embedding model name translation issue [2].

For your specific issue with memory usage reaching 100% and data being cleared after restarting Docker, here are some suggestions:

  1. Batch Processing: Consider processing data in smaller batches to reduce peak memory usage.
  2. Increase Memory Allocation: Adjust Docker settings to allocate more memory to the container.
  3. Optimize Embedding Size: If feasible, reduce the dimensionality of the embeddings.
  4. Use Swap Space: Configure your system to use swap space to handle memory spikes.
  5. Monitor and Log Memory Usage: Use tools like objgraph to monitor memory usage and identify inefficiencies [3].

Additionally, ensure that your Docker Compose configuration includes volume mounts for data persistence. This will help maintain your downloaded plugins and created knowledge bases across Docker restarts [4].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 2, 2025): <!-- Greeting --> Hey @Dong09! 👋 I'm here to assist you with bug fixes, answer your questions, and help you become a contributor. Let's tackle this issue together! <!-- Answer --> I found a similar unsolved discussion regarding abnormal disk usage after upgrading to version 1.0.0, where the disk size keeps increasing rapidly even without actual use <sup>[[1]](https://github.com/langgenius/dify/discussions/15421)</sup>. Additionally, there is a closed issue about the knowledge base frequently disappearing, which was resolved by a pull request that fixed an embedding model name translation issue <sup>[[2]](https://github.com/langgenius/dify/issues/14793)</sup>. For your specific issue with memory usage reaching 100% and data being cleared after restarting Docker, here are some suggestions: 1. **Batch Processing**: Consider processing data in smaller batches to reduce peak memory usage. 2. **Increase Memory Allocation**: Adjust Docker settings to allocate more memory to the container. 3. **Optimize Embedding Size**: If feasible, reduce the dimensionality of the embeddings. 4. **Use Swap Space**: Configure your system to use swap space to handle memory spikes. 5. **Monitor and Log Memory Usage**: Use tools like `objgraph` to monitor memory usage and identify inefficiencies <sup>[[3]](https://github.com/langgenius/dify/issues/12893)</sup>. Additionally, ensure that your Docker Compose configuration includes volume mounts for data persistence. This will help maintain your downloaded plugins and created knowledge bases across Docker restarts <sup>[[4]](https://github.com/langgenius/dify/blob/main/docker/docker-compose-template.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d943cb57-eb8b-45ac-b730-55d4c03287a9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d943cb57-eb8b-45ac-b730-55d4c03287a9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d943cb57-eb8b-45ac-b730-55d4c03287a9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d943cb57-eb8b-45ac-b730-55d4c03287a9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d943cb57-eb8b-45ac-b730-55d4c03287a9?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d943cb57-eb8b-45ac-b730-55d4c03287a9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d943cb57-eb8b-45ac-b730-55d4c03287a9?feedback_type=other)</sup>
Author
Owner

@mamema commented on GitHub (Apr 15, 2025):

regarding this:

Batch Processing: Consider processing data in smaller batches to reduce peak memory usage.

The cause for using Batch processing in the first place is to throw a (huge) bunch of files on something and let the application do the rest. So, why should a human resize the batches? This needs manual (recurring) intervention.
Why can´t we throw 500 files into the batch and dify is handling the working on the individual files, as dify surely knows better which resources are currently available

@mamema commented on GitHub (Apr 15, 2025): regarding this: >Batch Processing: Consider processing data in smaller batches to reduce peak memory usage. The cause for using Batch processing in the first place is to throw a (huge) bunch of files on something and let the application do the rest. So, why should a human resize the batches? This needs manual (recurring) intervention. Why can´t we throw 500 files into the batch and dify is handling the working on the individual files, as dify surely knows better which resources are currently available
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12472