[GH-ISSUE #24743] issue: PersistentConfig Duplicate Inserts Cause External Connections and Model Parameters to be Lost After Restart #107383

Open
opened 2026-05-18 06:10:57 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @DannielZhang on GitHub (May 15, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24743

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0.9.2 and 0.9.5

Ollama Version (if applicable)

none, I use llamaCpp server + api_proxy by myself

Operating System

win11 + wsl2, ubuntu 24.04

Browser (if applicable)

edge

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 provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

All configurations set through the Web UI should persist after container restart.

Actual Behavior

External connections and advanced model parameters are lost after restart.

Steps to Reproduce

Start Open WebUI + Qdrant via docker-compose up -d.

Add two external OpenAI connections in the Admin Panel (pointing to two llama.cpp services on ports 8085 and 8086), and configure model IDs for each.

Set advanced model parameters in the Workspace (e.g., context length, temperature).

Use the system normally for some time (potentially triggering the Async Context Compression plugin, Code Interpreter, etc.).

Restart the container: docker-compose restart open-webui.

Log back into WebUI and observe that the external connection configurations in the Admin Panel have disappeared, and the advanced model parameters have been restored to their defaults.

Logs & Screenshots

Image

Additional Information

RESET_CONFIG_ON_START=false has been properly set;

Data directory is mounted to an external disk with correct permissions;

ENABLE_PERSISTENT_CONFIG=false is not set, so default persistence behavior should be active;

Third-party plugin Async Context Compression is in use (source: https://github.com/Fu-Jie/openwebui-extensions).

# Investigation and Findings
By entering the container and inspecting the config table in the SQLite database webui.db, I found multiple PersistentConfig records (id=1,2,3,4):

id=1 contains the complete external connection configuration (two llama.cpp service connections, model IDs, etc.);

id=2,3,4 contain only the Ollama default configuration ("ollama": {"enable": false, "base_urls": [...]}), without any external connection information.

When the issue occurs, the system appears to load the last configuration record (id=4) upon restart, causing the external connection configurations to be overwritten and lost.

## Temporary Workaround
Manually delete the extraneous records in the database, keeping only the correct one:

sql
DELETE FROM config WHERE id IN (2,3,4);
After restarting the container, the external connection configurations are restored.

## Possible Root Cause Hypotheses
The PersistentConfig save/load mechanism may have the following issues:

Certain operations (such as plugin async tasks, Code Interpreter initialization, etc.) trigger duplicate inserts (new rows) into PersistentConfig instead of updating the existing row;

Upon system restart, the configuration loading logic may use incorrect sorting/querying logic (e.g., always reading the last record), causing it to load an incomplete default configuration;

Alternatively, the config_path may not remain unique during save operations, resulting in multiple coexisting records.

Originally created by @DannielZhang on GitHub (May 15, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24743 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0.9.2 and 0.9.5 ### Ollama Version (if applicable) none, I use llamaCpp server + api_proxy by myself ### Operating System win11 + wsl2, ubuntu 24.04 ### Browser (if applicable) edge ### 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 **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior All configurations set through the Web UI should persist after container restart. ### Actual Behavior External connections and advanced model parameters are lost after restart. ### Steps to Reproduce Start Open WebUI + Qdrant via docker-compose up -d. Add two external OpenAI connections in the Admin Panel (pointing to two llama.cpp services on ports 8085 and 8086), and configure model IDs for each. Set advanced model parameters in the Workspace (e.g., context length, temperature). Use the system normally for some time (potentially triggering the Async Context Compression plugin, Code Interpreter, etc.). Restart the container: docker-compose restart open-webui. Log back into WebUI and observe that the external connection configurations in the Admin Panel have disappeared, and the advanced model parameters have been restored to their defaults. ### Logs & Screenshots <img width="1578" height="176" alt="Image" src="https://github.com/user-attachments/assets/0ae16cae-7b7a-4b5b-b39f-2b2de856299f" /> ### Additional Information RESET_CONFIG_ON_START=false has been properly set; Data directory is mounted to an external disk with correct permissions; ENABLE_PERSISTENT_CONFIG=false is not set, so default persistence behavior should be active; Third-party plugin Async Context Compression is in use (source: https://github.com/Fu-Jie/openwebui-extensions). **# Investigation and Findings** By entering the container and inspecting the config table in the SQLite database webui.db, I found multiple PersistentConfig records (id=1,2,3,4): id=1 contains the complete external connection configuration (two llama.cpp service connections, model IDs, etc.); id=2,3,4 contain only the Ollama default configuration ("ollama": {"enable": false, "base_urls": [...]}), without any external connection information. When the issue occurs, the system appears to load the last configuration record (id=4) upon restart, causing the external connection configurations to be overwritten and lost. **## Temporary Workaround** Manually delete the extraneous records in the database, keeping only the correct one: sql DELETE FROM config WHERE id IN (2,3,4); After restarting the container, the external connection configurations are restored. **## Possible Root Cause Hypotheses** The PersistentConfig save/load mechanism may have the following issues: Certain operations (such as plugin async tasks, Code Interpreter initialization, etc.) trigger duplicate inserts (new rows) into PersistentConfig instead of updating the existing row; Upon system restart, the configuration loading logic may use incorrect sorting/querying logic (e.g., always reading the last record), causing it to load an incomplete default configuration; Alternatively, the config_path may not remain unique during save operations, resulting in multiple coexisting records.
GiteaMirror added the bug label 2026-05-18 06:10:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#107383