-
Aryan Noshirvani authored
Root cause of the reported polling failure: two remix jobs submitted close together both landed in separate_stems() around the same time and hung indefinitely - confirmed via direct DB inspection, both stuck at "separating" with zero progress and low process CPU for 30+ seconds straight, not just slow. Each call was also instantiating a brand new demucs.api.Separator (reloading model weights from disk) every single time, with no thread-safety guarantee from demucs/HF Hub's model caching under concurrent access - the likely deadlock source. Fixed by caching a single lazily-created Separator instance and wrapping all separation calls in a threading.Lock, so only one Demucs pass runs at a time process-wide; concurrent jobs now queue instead of racing. This VPS's CPU has no SSE3/SSE4/AVX and would thrash badly running two Demucs passes concurrently anyway, so serializing is also just the right call for this hardware, independent of the hang. Verified with two remix jobs submitted ~simultaneously via Playwright against separate browser contexts - both now complete cleanly instead of hanging. Co-Authored-By:
Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BCxXmJVvDFJVHTUi4QgNzi
ef508645
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| api | ||
| core | ||
| services | ||
| telegram_bot | ||
| telegram_worker |