From 893584700ae080d39ee63f8f98e4892345f1d6ce Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Wed, 25 Nov 2026 09:47:34 +0100 Subject: [PATCH] fix: upgrade looks stuck while it moves chat messages (#35054) During a database upgrade the log only named the step that was running, and the progress lines of long steps never showed, whatever GLOBAL_LOG_LEVEL was set to. On a big install an admin saw `Running upgrade d2f86c0b41ae -> 5e7a2c9d4b13` and then nothing for minutes while the chat messages were moved, which looks like a hung upgrade and invites a restart in the middle of it. The database upgrade steps now log at the level set in GLOBAL_LOG_LEVEL, so with the default the running count of moved chats shows while the step works. Fixes #35052 --- backend/open_webui/migrations/env.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/migrations/env.py b/backend/open_webui/migrations/env.py index c6e385d74d..520d5c327a 100644 --- a/backend/open_webui/migrations/env.py +++ b/backend/open_webui/migrations/env.py @@ -8,7 +8,7 @@ import logging.config import alembic.context from alembic.runtime.migration import MigrationContext -from open_webui.env import DATABASE_PASSWORD, DATABASE_SCHEMA, DATABASE_URL, LOG_FORMAT +from open_webui.env import DATABASE_PASSWORD, DATABASE_SCHEMA, DATABASE_URL, GLOBAL_LOG_LEVEL, LOG_FORMAT from open_webui.internal.db import enable_iam_token_auth, extract_ssl_params_from_url, reattach_ssl_params_to_url from open_webui.models.auths import Auth from open_webui.models.calendar import Calendar, CalendarEvent, CalendarEventAttendee # noqa: F401 @@ -21,6 +21,7 @@ from sqlalchemy import create_engine, engine_from_config, inspect, pool alembic_config = alembic.context.config if alembic_config.config_file_name: logging.config.fileConfig(alembic_config.config_file_name, disable_existing_loggers=False) + logging.root.setLevel(GLOBAL_LOG_LEVEL) if LOG_FORMAT == 'json': from open_webui.env import JSONFormatter