mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 08:21:12 -05:00
[GH-ISSUE #24743] issue: PersistentConfig Duplicate Inserts Cause External Connections and Model Parameters to be Lost After Restart #107383
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 @DannielZhang on GitHub (May 15, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24743
Check Existing Issues
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
README.md.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
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.