litellm/tests/test_litellm/proxy/utils
Yassin Kortam 8417b962a2 fix(proxy): recover Prisma DB reconnect loop when client is disconnected
Once the active Prisma client is in the disconnected state, every DB call
raises ClientNotConnectedError. The reconnect machinery was supposed to
recover from this, but _get_engine_pid() inspected the broken client via
prisma's _engine property, which re-raises that same error, so
recreate_prisma_client failed before it could build a replacement client
and the proxy looped on failed reconnects forever (issue #28322 showed
1486+ consecutive failures over 30 days with zero recoveries)

Guard both _get_engine_pid implementations with is_connected() so a
disconnected client reads as "no engine" (pid 0) and the recreate path
proceeds to construct and connect a fresh client
2026-07-07 09:50:27 +03:00
..
helpers test(proxy/utils): pin bottom-of-file helper behavior (#29509) 2026-06-02 17:45:19 -07:00
prisma_and_spend fix(proxy): recover Prisma DB reconnect loop when client is disconnected 2026-07-07 09:50:27 +03:00
proxy_logging fix(guardrails): match policy-pipeline block response to direct guardrail attachment (#31421) 2026-06-26 14:25:10 -07:00
__init__.py test(proxy/utils): pin bottom-of-file helper behavior (#29509) 2026-06-02 17:45:19 -07:00