mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #19844] bug: logs truncated on crash in containerized setting, Dockerfile missing ENV PYTHONUNBUFFERED=1
#34546
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wilson0x4d on GitHub (Dec 9, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19844
Check Existing Issues
Installation Method
Docker
Open WebUI Version
all
Ollama Version (if applicable)
No response
Operating System
Linux
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Logs are reliably written.
Actual Behavior
Logs are NOT reliably written.
Steps to Reproduce
In Python stdio is buffered.
If an aplication crashes, buffered writes are lost.
This manifests as truncation in logs, which we need for diagnostics and bug reporting.
This is fixed by adding the following your your containerfile(s):
This ensures stdout/stderr are unbuffered so that logs contain all expected output (except the most extreme situations: network fallout, disk failure, power outage, etc.)
This is actively blocking me from submitting a useful bug report for a crashing deployment, and now my only option is to pull sources down, and either roll my own image or debug in-place ... it's a huge waste of human capital we can avoid in the future with one line of code.
Please and thank you.
Logs & Screenshots
I've limited the logs for brevity:
How about some version info, pretty, but also useless:
well at least I feel better! 🤣
Additional Information
incidentally, whoever did the A1111 testing ran into this because their containerfile explicitly disables buffering via CLI. +shrug+
i would advise the ENV var so any code that might also be looking for it will find it (as opposed to only addressing this for the cpython interpreter/runtime itself.)
see also: https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED
also, thanks for your effort. i know how thankless the community can be. this is actually extremely valuable work.
@owui-terminator[bot] commented on GitHub (Dec 9, 2025):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#19777 issue:
by Yaute7 • Dec 05, 2025 •
bug#19563 issue:
by naruto7g • Nov 28, 2025 •
bug#19211 issue:
by Byrnes9 • Nov 16, 2025 •
bug#15638 issue:
by PaulX1029 • Jul 11, 2025 •
bug#16959 issue:
by Te-eMster • Aug 27, 2025 •
bugShow 5 more related issues
#17391 issue:
by abxis • Sep 12, 2025 •
bug#17393 issue:
by abxis • Sep 12, 2025 •
bug#17390 issue:
by abxis • Sep 12, 2025 •
bug#17388 issue:
by abxis • Sep 12, 2025 •
bug#17387 issue:
by abxis • Sep 12, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@tjbck commented on GitHub (Dec 11, 2025):
4c4b9d19a1