unslothai/unsloth · error · SttUnavailableError
llama-server did not become ready for '{model_id}'.
Error message
llama-server did not become ready for '{model_id}'. What it means
SttUnavailableError raised when _wait_for_server() returns False without cancellation: llama-server was spawned for model_id but did not answer its readiness probe in time. The failed process is reaped first (it was never assigned to self._process, so unload() could not reach it), then the error names the model.
Source
Thrown at studio/backend/core/inference/stt_mtmd_sidecar.py:927
# Die with Studio, so a crash never orphans a server on the GPU.
**child_popen_kwargs(),
)
# Published before the wait, so training can preempt a startup that
# is already allocating; _process is not set for another 180s.
with self._lock:
self._starting_process = process
adopt_pid(process.pid) # terminate_all backstop for graceful exits
if not self._wait_for_server(process, port, cancel_event):
# Reap it here: _process was never assigned, so unload() cannot
# reach a child that ignores SIGTERM and keeps port and VRAM.
_reap(process)
if cancel_event.is_set():
# 409 through the route, like the other sidecars: expected
# preemption, not a broken or missing runtime (501).
raise SttLoadCancelledError(
"Dictation model loading was cancelled so training could start."
)
raise SttUnavailableError(f"llama-server did not become ready for '{model_id}'.")
with self._lock:
self._process = process
self._port = port
self._model_id = model_id
self._gpu_disabled = training
self._generation += 1
self._schedule_idle_unload_locked()
finally:
with self._lock:
self._loading = False
self._load_cancel_event = None
self._load_owner_cancel_event = None
self._starting_process = None
@staticmethod
def _wait_for_server(
process: subprocess.Popen,
port: int,View on GitHub (pinned to 203007d190)
Solutions
- Retry once — cold-cache loads of large models can exceed the readiness window.
- Check llama-server logs/stderr for crash causes (bad GGUF, CUDA OOM, missing mmproj).
- Free GPU memory (close other model backends) or pick a smaller STT model.
- Re-download the model to rule out a corrupted snapshot.
Defensive patterns
Strategy: retry
Validate before calling
```python
import shutil, psutil
if psutil.virtual_memory().percent > 95 or gpu_memory_free() < model_min_vram(model_id):
free_resources_before_load(model_id)
``` Try / catch
```python
try:
sidecar.load(model_id)
except SttUnavailableError as exc:
if "did not become ready" in str(exc):
log_llama_server_stderr()
retry_once_after(freeing_vram=True)
raise
``` Prevention
- Keep llama-server logs accessible to diagnose crash-on-start causes.
- Preload models during idle time so cold-start timeouts never hit a live user.
- Match model size to available VRAM; re-download on suspicion of corruption.
When it happens
Trigger: llama-server startup exceeding the readiness timeout: huge model loading from disk, GPU driver stall/OOM during CUDA init, corrupt GGUF file, or the server crashing on an incompatible mmproj/model pairing.
Common situations: First load of a large model on a slow disk; VRAM exhausted by other processes; mismatched model/mmproj revisions after a partial download; antivirus or sandbox slowing process spawn on Windows.
Related errors
- The local transcription runtime is being updated. Try dictat
- STT model '{model}' is not a curated llama.cpp dictation mod
- llama.cpp is not installed, so these dictation models cannot
- Transcription cancelled.
- Dictation model loading was cancelled so training could star
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/77b53ce91940b529.
Report an issue: GitHub.