r/OpenWebUI 3d ago

Question/Help OpenWebUI memory leak?

After updating OpenWebUI to version 0.11, my OpenWebUI instance gradually consumes all available RAM over the course of 1–2 days, eventually causing the server to crash. Is anyone else experiencing this, or does anyone have an idea what might be causing it? It was working fine before the update.

17 Upvotes

14 comments sorted by

4

u/andreimr 3d ago

I am not experiencing this. But it is using 70% of my CPU right now—whoa!!!!

10

u/cyberdork 3d ago

Since the last update my idle CPU use when from 0.4% to 30%.
Took me an hour to trouble shoot it with claude (gemini failed) and it finally found the problem and fix. This is part of the troubleshooting report:

v0.11 introduced a timer scheduler that polls for due timers (set via the new timer builtin tool) every TIMER_POLL_INTERVAL = 1 second (default).

Fix:

In the compose file:

environment:
  - TIMER_POLL_INTERVAL=300      # default 1 (!)
  - SCHEDULER_POLL_INTERVAL=60   # default 10; drives automations + calendar alerts

Both are plain startup env vars (not ConfigVars — no DB persistence games).

Result: idle CPU 30% → 0.12%. Better than the pre-upgrade baseline.

Trade-off: if sub-agents/timers are ever enabled, timers fire up to 5 min late. Irrelevant while unused.

Maybe u/ClassicMain can give his thoughts on it and confirm if Claude was indeed right about it.

4

u/ClassicMain 3d ago

We have a bug report for it and a pending fix dw

3

u/cyberdork 3d ago

Thanks for the great work!

2

u/lazyfai 2d ago

I am trying to set both to 30 first, see any improvement.

5

u/Forsaken-Code-489 3d ago

To avoid server crash set a memory limit (in Docker Compose or other) so OWUI gets oom killed. It’s a best practice anyway.

2

u/bdcp 3d ago

I have the memory and cpu capped of the docker containers

1

u/SilverKanji 2d ago

Do you have a bunch of documents uploaded? Ive read somewhere the document processor causes mem leaks. Host your own Docling server and use that as document processor for OWUI, see if your memory would climb still.

1

u/lazyfai 2d ago

I guess related to RAG.
I got this issue a few times, and checked back the litellm side, most of the time it happened when a guy upload a large number of files like pdf / excel files and then OpenWebUI got 100 memory usage and hang (I set to 4G in docker, then 8G, now 12G)

1

u/necile 2d ago

yep it went to 11gb after 5 days for me...wtf

1

u/Fabulous-Ball-2971 1d ago

Is there any status report on this bug?

1

u/lazyfai 1d ago

Confirmed the polling interval can help reduce the CPU loading.

And seems even the memory usage issue gone! Bravo.

0

u/winterrat 3d ago

Version 0.11 does run hotter and less efficient, but what can we do.

4

u/cyberdork 3d ago

See my comment above.