litellm - 💡(How to fix) Fix [Bug]: Prisma reconnection failed [1 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#26886Fetched 2026-05-01 05:34:31
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Error Message

13:50:30 - LiteLLM Proxy:WARNING: utils.py:4178 - Attempting Prisma DB reconnect. reason=db_health_watchdog_connection_error 13:50:30 - LiteLLM Proxy:ERROR: utils.py:3918 - prisma-query-engine PID 71 exited (waitpid thread); triggering reconnect.

Code Example

13:50:30 - LiteLLM Proxy:WARNING: utils.py:4178 - Attempting Prisma DB reconnect. reason=db_health_watchdog_connection_error
13:50:30 - LiteLLM Proxy:ERROR: utils.py:3918 - prisma-query-engine PID 71 exited (waitpid thread); triggering reconnect.

---

prisma.errors.ClientNotConnectedError: Client is not connected to the query engine, you must call `connect()` before attempting to query data.

---
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

We've been experiencing periodic instability in our LiteLLM proxy pod. The issue manifests as the Prisma query engine process crashing:

13:50:30 - LiteLLM Proxy:WARNING: utils.py:4178 - Attempting Prisma DB reconnect. reason=db_health_watchdog_connection_error
13:50:30 - LiteLLM Proxy:ERROR: utils.py:3918 - prisma-query-engine PID 71 exited (waitpid thread); triggering reconnect.

Once the query engine crashes, all subsequent database calls fail immediately:

prisma.errors.ClientNotConnectedError: Client is not connected to the query engine, you must call `connect()` before attempting to query data.

LiteLLM detects the persistent failures and performs a clean shutdown, triggering a Kubernetes pod restart. This restart cycle repeated 4 times before the reconnect finally succeeded and the pod reached a stable state on the 5th attempt.

We have two questions:

  1. Is this a known bug in LiteLLM or Prisma, or is this expected behavior under certain conditions?
  2. Are there any configuration changes (e.g., connection pool tuning, reconnect retry settings, keepalive parameters) we can apply to either prevent the query engine from crashing or make the reconnect more resilient so it succeeds on the first attempt rather than requiring multiple pod restarts?

Steps to Reproduce

The issue happens intermittently, not easy to reproduce

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

1.83.10-stable

Twitter / LinkedIn details

No response

extent analysis

TL;DR

  • Adjusting the reconnect retry settings and connection pool tuning in the Prisma query engine may help prevent crashes and improve resilience.

Guidance

  • Investigate the db_health_watchdog_connection_error reason for the Prisma DB reconnect attempt to understand the root cause of the query engine crash.
  • Review the LiteLLM and Prisma documentation for configuration options related to connection pooling, reconnect retries, and keepalive parameters that can be adjusted to improve stability.
  • Consider increasing the reconnect retry limit or adjusting the retry delay to allow for more attempts before triggering a pod restart.
  • Monitor the Prisma query engine logs and LiteLLM proxy logs to identify any patterns or correlations between the crashes and other system events.

Notes

  • The intermittent nature of the issue makes it challenging to reproduce and debug, so monitoring and logging will be crucial in identifying the root cause.
  • The LiteLLM version (

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

litellm - 💡(How to fix) Fix [Bug]: Prisma reconnection failed [1 participants]