litellm - 💡(How to fix) Fix Getting the below error while login to liteLLm admin UI [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23210Fetched 2026-04-08 00:38:02
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
commented ×1mentioned ×1subscribed ×1

Error Message

00:06:53 - LiteLLM Proxy:ERROR: internal_user_endpoints.py:1094 - litellm.proxy.proxy_server.user_update(): Exception occured - Not connected to DB! Traceback (most recent call last): raise Exception("Not connected to DB!") Exception: Not connected to DB! 00:06:53 - LiteLLM Proxy:DEBUG: internal_user_endpoints.py:1099 - Traceback (most recent call last):

RAW_BUFFERClick to expand / collapse

00:06:53 - LiteLLM Proxy:DEBUG: internal_user_endpoints.py:1086 - /user/update: Received data = key_alias=None duration=None models=[] spend=None max_budget=None user_id='default_user_id' team_id=None max_parallel_requests=None metadata=None tpm_limit=None rpm_limit=None budget_duration=None allowed_cache_controls=[] config={} permissions={} model_max_budget={} model_rpm_limit=None model_tpm_limit=None guardrails=None policies=None prompts=None blocked=None aliases={} object_permission=None password=None user_alias=None user_role=<LitellmUserRoles.PROXY_ADMIN: 'proxy_admin'> user_email=None 00:06:53 - LiteLLM Proxy:ERROR: internal_user_endpoints.py:1094 - litellm.proxy.proxy_server.user_update(): Exception occured - Not connected to DB! Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/litellm/proxy/management_endpoints/internal_user_endpoints.py", line 1088, in user_update response = await _update_single_user_helper( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<2 lines>... ) ^ File "/usr/lib/python3.13/site-packages/litellm/proxy/management_endpoints/internal_user_endpoints.py", line 880, in _update_single_user_helper raise Exception("Not connected to DB!") Exception: Not connected to DB! 00:06:53 - LiteLLM Proxy:DEBUG: internal_user_endpoints.py:1099 - Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/litellm/proxy/management_endpoints/internal_user_endpoints.py", line 1088, in user_update response = await _update_single_user_helper( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

command i have used to run litellm on docker:

docker run -p 4000:4000 -e LITELLM_MASTER_KEY=somepassword -v <windows path>\litellm\config.yaml:/app/config.yaml -v <windows path>\litellm\litellm.db:/app/litellm.db --name litellm_new docker.litellm.ai/berriai/litellm:main-latest --detailed_debug

Please help to resolve the issue

extent analysis

Fix Plan

The issue seems to be related to the database connection. To resolve this, we need to ensure that the database is properly connected and configured.

Step-by-Step Solution:

  1. Check Database Configuration: Verify that the config.yaml file contains the correct database configuration.
  2. Database Connection String: Ensure that the database connection string is correctly formatted and points to the correct location of the litellm.db file.
  3. Mount Database Volume: Make sure that the database volume is correctly mounted in the Docker container.

Example Code:

# config.yaml
database:
  path: /app/litellm.db
# Docker run command with correct volume mounting
docker run -p 4000:4000 \
  -e LITELLM_MASTER_KEY=somepassword \
  -v /path/to/litellm/config.yaml:/app/config.yaml \
  -v /path/to/litellm/litellm.db:/app/litellm.db \
  --name litellm_new \
  docker.litellm.ai/berriai/litellm:main-latest \
  --detailed_debug

Verification

To verify that the fix worked, check the LiteLLM Proxy logs for successful database connections and try updating a user again.

Extra Tips

  • Ensure that the litellm.db file has the correct permissions and is accessible by the Docker container.
  • If using a relative path for the database file, make sure it is relative to the correct directory.
  • Consider using environment variables to configure the database connection string for easier management.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING