Menu

1 / 5

Notes from a 2 AM On-Call: Ollama's Model Hot-Swap Race Condition Under Concurrent Requests

DEV Community: go·Kevin Tian·4 days ago
#qyuDFuwe
#devtogo#devto#dev#model#ollama
Reading 0:00
15s threshold

Notes from a 2 AM On-Call: Ollama's Model Hot-Swap Race Condition Under Concurrent Requests

The alert fired at 2:14 AM: inference latency spiked to 8+ seconds on our production Ollama cluster serving DeepSeek and Qwen models. No OOM kills, no CPU throttling, no network saturation. Just silent hangs followed by timeout errors from downstream clients.

The Failure Symptom

2025-01-23T02:14:37Z ERROR router: context deadline exceeded serving inference request 2025-01-23T02:14:38Z WARN model loader: attempted load during active unload operation 2025-01-23T02:14:39Z ERROR llama_cpp: model pointer nil after successful load check

Enter fullscreen mode

Exit fullscreen mode

The pattern was clear in our traces: requests hitting Ollama's /api/generate endpoint would hang indefinitely when a model hot-swap was triggered (switching from deepseek-coder:6.7b to qwen2.5:7b via the API).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.