Check for existing issues
What happened?
Environment
OS: Windows 10/11 x64
Python: 3.12.x (pythoncore-3.12-64)
LiteLLM versions affected: 1.82.0, 1.82.3, 1.83.0
LiteLLM last working version: 1.81.16
Installation method: pip (not Docker)
prisma-client-py: 0.15.0
Prisma CLI: 5.17.0
Node.js: v20.19.1 (also reproduced with v24.14.1)
PostgreSQL: 15.x at 127.0.0.1:5432
Virtual environment: Python venv at C:\LiteLLM\venv
What happened?
After upgrading from LiteLLM 1.81.x to any 1.82.x or 1.83.0 release via pip on Windows, the Prisma query engine crashes immediately on the first database query after startup. LiteLLM becomes completely unable to read from or write to the PostgreSQL database.
The Prisma migrations run successfully. The query engine binary is found and its PID is logged. However the very first query LiteLLM makes after startup returns httpcore.ReadError, indicating the engine process crashes mid-response. All subsequent queries fail with httpcore.ConnectError: All connection attempts failed because the engine process is dead.
Critically: The Prisma engine works perfectly fine in isolation. A standalone Python test script connecting to the same database with the same DATABASE_URL succeeds without any issues:
pythonimport asyncio
from prisma import Prisma
async def test():
db = Prisma()
await db.connect()
print('SUCCESS - connected!')
await db.disconnect()
asyncio.run(test())
Output: query-engine 393aa359c9ad4a4bb28630fb5613f9c281cde053
SUCCESS - connected!
This confirms the issue is in how LiteLLM 1.82.x/1.83.0 initializes or interacts with the Prisma client internally — not in Prisma, the binary, the database, or the network.
Relevant log output (with --debug)
query-engine 393aa359c9ad4a4bb28630fb5613f9c281cde053
LiteLLM Proxy:INFO: utils.py - Started Prisma DB health watchdog
LiteLLM Proxy:INFO: utils.py - Found prisma-query-engine at PID 29404.
LiteLLM Proxy:INFO: utils.py - Watching engine PID 29404 via os.kill polling.
LiteLLM Proxy:ERROR: proxy_server.py - litellm.proxy_server.py::add_deployment() - Error getting new models from DB -
File "prisma/engine/_http.py", line 217, in request
httpcore.ReadError <-- engine crashes on FIRST query
LiteLLM Proxy:ERROR: utils.py - LiteLLM Prisma Client Exception get_generic_data: All connection attempts failed
LiteLLM Proxy:ERROR: utils.py - LiteLLM Prisma Client Exception get_generic_data: All connection attempts failed
LiteLLM Proxy:ERROR: proxy_server.py - ProxyConfig:add_deployment - All connection attempts failed
File "prisma/engine/_http.py", line 217, in request
httpcore.ConnectError: All connection attempts failed <-- engine is dead, all subsequent queries fail
What I expected
LiteLLM should connect to PostgreSQL via Prisma and start successfully, as it did in 1.81.16.
What actually happened
The Prisma query engine process starts (PID is found and logged), but crashes on the very first query LiteLLM makes after startup (ReadError). All subsequent queries fail with ConnectError because the engine process is no longer running.
Steps to reproduce
Windows 10/11 x64, Python 3.12, pip install (not Docker)
Create a fresh venv: python -m venv venv
Install: pip install "litellm[proxy]==1.83.0"
Install prisma separately (not pulled in automatically): pip install prisma
Fetch binaries: cd venv/Lib/site-packages/litellm/proxy && prisma py fetch --force
Generate client: prisma generate --schema schema.prisma
Set DATABASE_URL environment variable to a valid PostgreSQL URL
Run: litellm --config config.yaml --debug
Observe ReadError on first query, then ConnectError on all subsequent queries
Additional investigation done
The following were ruled out as causes:
✅ PostgreSQL is running and accessible — standalone Prisma test script connects successfully
✅ DATABASE_URL is correctly set — confirmed via python -c "import os; print(os.environ.get('DATABASE_URL'))"
✅ Prisma binary is downloaded — prisma version shows correct binary at cache path
✅ Node.js version — reproduced with both v20.19.1 (LTS) and v24.14.1
✅ HTTP/HTTPS proxy vars — cleared $env:HTTP_PROXY, $env:HTTPS_PROXY, set $env:NO_PROXY=localhost,127.0.0.1 — no change
✅ Windows Defender — not blocking the binary (binary runs standalone)
✅ Fresh venv — reproduced on completely fresh virtual environment
✅ prisma py fetch --force — binaries downloaded successfully
✅ prisma generate --schema schema.prisma — client generated successfully
✅ Downgrading to litellm==1.81.16 — fixes the issue completely
Steps to Reproduce
Relevant log output
What part of LiteLLM is this about?
No response
What LiteLLM version are you on ?
v1.53.0
Twitter / LinkedIn details
No response
Check for existing issues
What happened?
Environment
OS: Windows 10/11 x64
Python: 3.12.x (pythoncore-3.12-64)
LiteLLM versions affected: 1.82.0, 1.82.3, 1.83.0
LiteLLM last working version: 1.81.16
Installation method: pip (not Docker)
prisma-client-py: 0.15.0
Prisma CLI: 5.17.0
Node.js: v20.19.1 (also reproduced with v24.14.1)
PostgreSQL: 15.x at 127.0.0.1:5432
Virtual environment: Python venv at C:\LiteLLM\venv
What happened?
After upgrading from LiteLLM 1.81.x to any 1.82.x or 1.83.0 release via pip on Windows, the Prisma query engine crashes immediately on the first database query after startup. LiteLLM becomes completely unable to read from or write to the PostgreSQL database.
The Prisma migrations run successfully. The query engine binary is found and its PID is logged. However the very first query LiteLLM makes after startup returns httpcore.ReadError, indicating the engine process crashes mid-response. All subsequent queries fail with httpcore.ConnectError: All connection attempts failed because the engine process is dead.
Critically: The Prisma engine works perfectly fine in isolation. A standalone Python test script connecting to the same database with the same DATABASE_URL succeeds without any issues:
pythonimport asyncio
from prisma import Prisma
async def test():
db = Prisma()
await db.connect()
print('SUCCESS - connected!')
await db.disconnect()
asyncio.run(test())
Output: query-engine 393aa359c9ad4a4bb28630fb5613f9c281cde053
SUCCESS - connected!
This confirms the issue is in how LiteLLM 1.82.x/1.83.0 initializes or interacts with the Prisma client internally — not in Prisma, the binary, the database, or the network.
Relevant log output (with --debug)
query-engine 393aa359c9ad4a4bb28630fb5613f9c281cde053
LiteLLM Proxy:INFO: utils.py - Started Prisma DB health watchdog
LiteLLM Proxy:INFO: utils.py - Found prisma-query-engine at PID 29404.
LiteLLM Proxy:INFO: utils.py - Watching engine PID 29404 via os.kill polling.
LiteLLM Proxy:ERROR: proxy_server.py - litellm.proxy_server.py::add_deployment() - Error getting new models from DB -
File "prisma/engine/_http.py", line 217, in request
httpcore.ReadError <-- engine crashes on FIRST query
LiteLLM Proxy:ERROR: utils.py - LiteLLM Prisma Client Exception get_generic_data: All connection attempts failed
LiteLLM Proxy:ERROR: utils.py - LiteLLM Prisma Client Exception get_generic_data: All connection attempts failed
LiteLLM Proxy:ERROR: proxy_server.py - ProxyConfig:add_deployment - All connection attempts failed
File "prisma/engine/_http.py", line 217, in request
httpcore.ConnectError: All connection attempts failed <-- engine is dead, all subsequent queries fail
What I expected
LiteLLM should connect to PostgreSQL via Prisma and start successfully, as it did in 1.81.16.
What actually happened
The Prisma query engine process starts (PID is found and logged), but crashes on the very first query LiteLLM makes after startup (ReadError). All subsequent queries fail with ConnectError because the engine process is no longer running.
Steps to reproduce
Windows 10/11 x64, Python 3.12, pip install (not Docker)
Create a fresh venv: python -m venv venv
Install: pip install "litellm[proxy]==1.83.0"
Install prisma separately (not pulled in automatically): pip install prisma
Fetch binaries: cd venv/Lib/site-packages/litellm/proxy && prisma py fetch --force
Generate client: prisma generate --schema schema.prisma
Set DATABASE_URL environment variable to a valid PostgreSQL URL
Run: litellm --config config.yaml --debug
Observe ReadError on first query, then ConnectError on all subsequent queries
Additional investigation done
The following were ruled out as causes:
✅ PostgreSQL is running and accessible — standalone Prisma test script connects successfully
✅ DATABASE_URL is correctly set — confirmed via python -c "import os; print(os.environ.get('DATABASE_URL'))"
✅ Prisma binary is downloaded — prisma version shows correct binary at cache path
✅ Node.js version — reproduced with both v20.19.1 (LTS) and v24.14.1
✅ HTTP/HTTPS proxy vars — cleared $env:HTTP_PROXY, $env:HTTPS_PROXY, set $env:NO_PROXY=localhost,127.0.0.1 — no change
✅ Windows Defender — not blocking the binary (binary runs standalone)
✅ Fresh venv — reproduced on completely fresh virtual environment
✅ prisma py fetch --force — binaries downloaded successfully
✅ prisma generate --schema schema.prisma — client generated successfully
✅ Downgrading to litellm==1.81.16 — fixes the issue completely
Steps to Reproduce
Relevant log output
What part of LiteLLM is this about?
No response
What LiteLLM version are you on ?
v1.53.0
Twitter / LinkedIn details
No response