issue: Memory Leak when uploading files to Knowledge #5326

Closed
opened 2025-11-11 16:17:27 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @FringeNet on GitHub (May 26, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.10

Ollama Version (if applicable)

v0.7.1

Operating System

Ubuntu 24.04

Browser (if applicable)

Brave v1.78.102

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

Memory usage should return to normal after uploading 2GB worth of docx, xlsx and pdf files.

Actual Behavior

Memory usage increases, and freezes my EC2 instance when it goes OOM. Increased the size of the instance to finish my task (4GB -> 32GB), but memory did not return to normal until I rebooted the container. It settled on ~18GB

Steps to Reproduce

  1. Configure Document embedding to use OpenAI 'text-embedding-3-large'. All other settings default, but hybrid retrieval enabled.
  2. Upload a large amount of documents using upload directory (~2GB), such as pdf's, docx, xlsx.
  • Uploading is where it breaks down, uploading continues as normal, as memory usage gradually increases until it reaches OOM and freezes up.

Logs & Screenshots

Image

This repeated for a few files:

{
    "id": "c105886b-5d92-4cb6-b146-614466f0949d",
    "meta": {
        "name": "10 X UVT Quartz Sleeves.pdf",
        "content_type": "application/pdf",
        "size": 524104,
        "data": {},
        "collection_name": "7bcfebc5-49dc-4deb-ad5f-0b3825226522"
    },
    "created_at": 1748106580,
    "updated_at": 1748106580
}

Network times out while uploading after the instance freezes.

Additional Information

I am not sure how to recover the logs of the previous container since the instance is freezing and the container is being restarted, and trying to view them live is impossible since I cannot access the instance after it freezes.

Originally created by @FringeNet on GitHub (May 26, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.10 ### Ollama Version (if applicable) v0.7.1 ### Operating System Ubuntu 24.04 ### Browser (if applicable) Brave v1.78.102 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior Memory usage should return to normal after uploading 2GB worth of docx, xlsx and pdf files. ### Actual Behavior Memory usage increases, and freezes my EC2 instance when it goes OOM. Increased the size of the instance to finish my task (4GB -> 32GB), but memory did not return to normal until I rebooted the container. It settled on ~18GB ### Steps to Reproduce 1. Configure Document embedding to use OpenAI 'text-embedding-3-large'. All other settings default, but hybrid retrieval enabled. 2. Upload a large amount of documents using upload directory (~2GB), such as pdf's, docx, xlsx. - Uploading is where it breaks down, uploading continues as normal, as memory usage gradually increases until it reaches OOM and freezes up. ### Logs & Screenshots ![Image](https://github.com/user-attachments/assets/22ffe29c-4c55-4950-8ad2-d3adaec8d7bf) This repeated for a few files: ``` { "id": "c105886b-5d92-4cb6-b146-614466f0949d", "meta": { "name": "10 X UVT Quartz Sleeves.pdf", "content_type": "application/pdf", "size": 524104, "data": {}, "collection_name": "7bcfebc5-49dc-4deb-ad5f-0b3825226522" }, "created_at": 1748106580, "updated_at": 1748106580 } ``` **Network times out while uploading after the instance freezes.** ### Additional Information I am not sure how to recover the logs of the previous container since the instance is freezing and the container is being restarted, and trying to view them live is impossible since I cannot access the instance after it freezes.
GiteaMirror added the bug label 2025-11-11 16:17:27 -06:00
Author
Owner

@tjbck commented on GitHub (May 26, 2025):

Use an external embedding engine.

@tjbck commented on GitHub (May 26, 2025): Use an external embedding engine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5326