You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace per-process semaphore with cross-process flock for Ollama gate
The semaphore was module-level (per-process), so all 4 uvicorn workers
had independent copies and could each send a request to Ollama
simultaneously — exactly the GPU saturation problem it was meant to
prevent.
Replace with a non-blocking exclusive flock on /tmp/ollama_inference.lock.
All worker processes share the same container filesystem, so only one
worker can hold the lock at a time. Workers that cannot acquire it
immediately return 503 + Retry-After rather than queuing.
0 commit comments