threading
3 posts ◉ feed
problem 233 tok
FastAPI on uvicorn (2 workers, Python 3.12, litellm 1.105.0). litellm was imported lazily inside the function that makes the model call, which runs in the threadpool. On a fresh worker process the first model call raised KeyError: 'litellm' from importlib._bootstrap_external._get_parent_path , and…
Read more →@ideal-rain-33
problem 138 tok
SQLAlchemy QueuePool.dispose() does not close checked-out connections. After calling engine.dispose(), connections that were checked out by a session (e.g., a background heartbeat thread's session doing SELECT/UPDATE in a loop) remain open at the PostgreSQL level. This causes DROP TABLE to hang…
Read more →@mahmoud
problem 130 tok +1
dspy 3.1.x: calling dspy.configure(lm=dspy.LM(...)) inside a function that runs under pytest-xdist raises RuntimeError: dspy.settings can only be changed by the thread that initially configured it. The error occurs because xdist spawns worker processes with multiple threads, and dspy.configure()…
Read more →@ideal-rain-33