Memory leak when embedding #3293

Closed
opened 2025-11-11 15:28:16 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Jehyun97 on GitHub (Jan 16, 2025).

Description

After completing the embedding process, I observed a significant increase in RAM usage, which does not decrease over time. I am using [Ollama/OpenWebUI], and I suspect the issue may be related to how RAM is managed after the embedding process. However, when both Ollama and OpenWebUI are turned off, the RAM usage does not increase, indicating that the issue is related to one of these components. Additionally, I installed OpenWebUI using pip.

Steps to Reproduce

  1. Install OpenWebUI via pip install open-webui.
  2. Run the embedding process on a set of documents using [Ollama/OpenWebUI].
  3. Monitor RAM usage during and after the process.
  4. Notice that RAM usage remains high even after the embedding process is completed.

Expected Behavior

RAM usage should decrease or stabilize once the embedding process is completed and resources are released.

Actual Behavior

RAM usage continues to rise or remains elevated after the embedding process is completed.

Environment

  • Hardware: NVIDIA RTX 4090, 128GB RAM
  • Software: [Specify Ollama/OpenWebUI versions]
  • Operating System: [Your OS version]

Additional Information

  • When both Ollama and OpenWebUI are turned off, RAM usage does not increase, which suggests that the issue is specific to one of these components.
  • Is this issue related to caching, session management, or intermediate data not being released?
  • Are there any known methods to free RAM after the embedding process in [Ollama/OpenWebUI]?

Any insights or fixes would be greatly appreciated. Thank you!

Originally created by @Jehyun97 on GitHub (Jan 16, 2025). ### Description After completing the embedding process, I observed a significant increase in RAM usage, which does not decrease over time. I am using [Ollama/OpenWebUI], and I suspect the issue may be related to how RAM is managed after the embedding process. However, when both Ollama and OpenWebUI are turned off, the RAM usage does not increase, indicating that the issue is related to one of these components. Additionally, I installed OpenWebUI using `pip`. ### Steps to Reproduce 1. Install OpenWebUI via `pip install open-webui`. 2. Run the embedding process on a set of documents using [Ollama/OpenWebUI]. 3. Monitor RAM usage during and after the process. 4. Notice that RAM usage remains high even after the embedding process is completed. ### Expected Behavior RAM usage should decrease or stabilize once the embedding process is completed and resources are released. ### Actual Behavior RAM usage continues to rise or remains elevated after the embedding process is completed. ### Environment - Hardware: NVIDIA RTX 4090, 128GB RAM - Software: [Specify Ollama/OpenWebUI versions] - Operating System: [Your OS version] ### Additional Information - When both Ollama and OpenWebUI are turned off, RAM usage does not increase, which suggests that the issue is specific to one of these components. - Is this issue related to caching, session management, or intermediate data not being released? - Are there any known methods to free RAM after the embedding process in [Ollama/OpenWebUI]? Any insights or fixes would be greatly appreciated. Thank you!
Author
Owner

@tjbck commented on GitHub (Jan 16, 2025):

Are you using the built-in inference engine for embeddings?

@tjbck commented on GitHub (Jan 16, 2025): Are you using the built-in inference engine for embeddings?
Author
Owner

@Jehyun97 commented on GitHub (Jan 16, 2025):

I am using Ollama as the inference engine for embeddings. The embeddings are generated through the built-in functionality provided by Ollama.

@Jehyun97 commented on GitHub (Jan 16, 2025): I am using Ollama as the inference engine for embeddings. The embeddings are generated through the built-in functionality provided by Ollama.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3293