Skip to content

API Stability Issues: Model Loading Hangs and Server Crashes #151

@mpecanha

Description

@mpecanha

Voicebox Bug Report — 2026-02-22

Summary

Multiple stability issues encountered while using Voicebox API for automated voice synthesis in a Telegram bot integration.

Environment

  • Voicebox Version: Latest (as of 2026-02-22)
  • OS: macOS (Apple Silicon — MPS backend)
  • API Port: 17493
  • Backend: MLX
  • Model: 1.7B parameter model

Issues Encountered

1. Model Loading Hangs / Timeout

Symptoms:

  • API returns model_loaded: false after restart
  • First synthesis request hangs for 30+ seconds
  • Process eventually times out (SIGTERM) or crashes

Steps to Reproduce:

  1. Restart Voicebox app
  2. Call /health endpoint — shows model_loaded: false
  3. Send POST to /generate endpoint
  4. Request hangs, no response

Expected: Model should load automatically on first use or provide status endpoint for polling
Actual: Request times out, user must manually click profile in UI to trigger load

2. Connection Reset / Remote Disconnect

Error:

Error synthesizing speech: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Context:

  • Occurred after ~5-10 synthesis requests
  • Server process crashed (verified via ps aux — only UI process remained)
  • No error logs visible in system logs

Impact: Complete service failure requiring manual restart

3. Incomplete Error Handling

Symptoms:

  • When model is not loaded, API accepts requests but never responds
  • No 503 Service Unavailable or clear error message
  • Client must implement arbitrary timeouts

Suggested Improvements

  1. Auto-load model on first API request with async status updates
  2. Health endpoint enhancements:
    • Add model_loading: true/false status
    • Add model_load_progress: 0-100 for polling
  3. Better error responses when model isn't ready (HTTP 503 with Retry-After)
  4. Log aggregation — expose recent errors via API or log file path
  5. Graceful degradation — queue requests while model loads instead of hanging

Reproduction Script

import requests
import time

# After Voicebox restart, this will hang
response = requests.post(
    "http://localhost:17493/generate",
    json={
        "profile_id": "048cfe9b-8b38-4a6d-949b-81439348a5d5",
        "text": "Testing voicebox stability",
        "language": "en"
    },
    timeout=30  # Will timeout if model not pre-loaded
)

Logs

Captured from testing session:

  • Process started: voicebox-server on port 17493
  • Model status: downloaded but not loaded
  • First request: timeout/SIGTERM
  • Subsequent requests: RemoteDisconnected after ~10 requests
  • Final state: server process crashed, UI remained

Impact

  • Cannot use Voicebox for automated/headless workflows
  • Requires manual intervention (clicking UI) after every restart
  • Unreliable for production use with automated systems

Reported by: Krill (OpenClaw integration)
Date: 2026-02-22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions