Skip to main content

Symptom

Jobs remain in ENCODING status after system restart or crash. Progress bar frozen at last checkpoint.

Cause

Worker process terminated unexpectedly before updating job status to COMPLETED or FAILED. Common scenarios:
  • System reboot during encoding
  • Docker container killed
  • Out-of-memory (OOM) kill
  • Power loss

Fix

BitBonsai automatically recovers orphaned jobs on backend startup:
No action needed. Jobs will restart from beginning on next queue cycle.Verify recovery in logs:
The Stuck Job Watchdog (if enabled) automatically detects jobs with no progress updates for 30+ minutes and resets them.

Symptom

Child node logs show:

Cause

Worker node cannot access shared storage via NFS mount. Common reasons:
  • NFS server is down
  • Export path not configured correctly
  • Network connectivity issue
  • Mount point not created

Fix

1

Verify NFS Server Running

On the main node (Unraid):
2

Check NFS Exports

Verify shared directories are exported:
If missing, add to /etc/exports:
Then reload:
3

Test Mount Manually

On the child node (worker):
If mount fails, check network connectivity:
4

Check Firewall Rules

NFS requires these ports open on the main node:
  • TCP/UDP 2049 (NFS)
  • TCP/UDP 111 (portmapper)
On Unraid, check firewall settings or disable temporarily to test.
5

Restart Worker Service

After fixing mount issues:
BitBonsai retries temp file detection 10 times with 2-second delays. If NFS mount is slow to come up after boot, increase retry count in encoding-processor.service.ts.

Symptom

Jobs complete encoding but marked as CORRUPTED instead of COMPLETED. Error in logs:

Cause

Post-encoding validation detected issues:
  • Output file corrupted during encoding
  • File moved/deleted during health check
  • NFS network interruption during validation
  • FFprobe timeout or crash

Fix

1

Verify File Integrity

Check if output file actually exists and is playable:
If file is valid, this is a false positive health check failure.
2

Manual Re-validation

Trigger health check retry:
  1. Navigate to Jobs page → Filter by CORRUPTED
  2. Select job(s)
  3. Click Actions → Re-validate Health
Or via API:
3

Automatic Hourly Retry

BitBonsai automatically re-checks CORRUPTED jobs every hour:
Check logs to confirm auto-recovery:
4

Increase Retry Threshold (If Persistent)

If health checks consistently fail on slow storage:Edit apps/backend/src/queue/health-check.worker.ts:
Rebuild and redeploy backend container.
Do NOT blindly mark CORRUPTED jobs as COMPLETED without validation. Verify file integrity first to avoid data loss.

Symptom

Child node shows as OFFLINE or DISCONNECTED in UI. Worker logs show:

Cause

Worker node cannot reach main node API. Common reasons:
  • Network connectivity issue
  • Firewall blocking port 3100
  • Main node backend service down
  • Invalid API key configuration

Fix

1

Verify Network Connectivity

On child node:
2

Check Firewall Rules

On main node, ensure port 3100 is open:
3

Verify Main Node Backend Running

4

Validate API Key Configuration

Worker nodes must provide valid API key to connect:On child node, check environment variables:
Verify API key matches main node configuration:
Update child node config if needed:
Child nodes in OFFLINE state won’t receive job assignments. Fix connectivity issues promptly to avoid job queue buildup.

Symptom

Web UI shows loading spinner indefinitely or displays:

Cause

Frontend cannot reach backend API. Possible reasons:
  • Backend container not running
  • Port 3100 not exposed
  • Incorrect API_URL environment variable
  • CORS configuration issue (if accessing from different origin)

Fix

1

Verify Backend Container Running

If not running:
2

Test Backend API Directly

3

Check API_URL Configuration

Verify frontend knows where to find backend:
Update docker-compose.yml if incorrect:
Restart:
4

Verify Browser Network Tab

Open browser DevTools (F12) → Network tab:
  1. Refresh BitBonsai UI
  2. Look for failed API requests
  3. Check request URL matches backend address
  4. Check for CORS errors in console
Common fixes:
  • Wrong URL: Update API_URL environment variable
  • CORS error: Add your frontend origin to backend CORS config
  • ERR_CONNECTION_REFUSED: Backend not accessible from browser’s network
If accessing BitBonsai from a different machine, use http://[server-ip]:4210 and ensure API_URL is set to http://[server-ip]:3100.

Symptom

Backend logs show:

Cause

Backend cannot connect to PostgreSQL database. Possible reasons:
  • PostgreSQL container not running
  • Incorrect DATABASE_URL connection string
  • Database initialization not complete
  • Network issue between containers

Fix

1

Check PostgreSQL Container Health

If not healthy:
2

Verify DATABASE_URL Correct

Check backend environment:
Common mistakes:
  • Hostname: postgres (Docker service name), NOT localhost
  • Password: Must match POSTGRES_PASSWORD in postgres service
  • Port: 5432 (internal Docker network port)
Update docker-compose.yml if incorrect:
Restart:
3

Test Database Connection Manually

If connection fails:
  • Check credentials match POSTGRES_USER and POSTGRES_PASSWORD
  • Verify database bitbonsai exists: \l in psql
4

Recreate Database (Last Resort)

This will delete all data. Backup first if needed.
Backend will automatically apply migrations on startup.

Symptom

Encoding fails with:

Cause

Temporary directory ran out of space during encoding. FFmpeg creates temporary files that can be 1-2× original video size before final compression.

Fix

1

Check Available Space

2

Clear Old Temporary Files

Only clear temp files when no jobs are actively encoding. Check Jobs page first.
3

Reduce Concurrent Jobs

Lower parallel job limit to reduce temp space usage:
  1. Navigate to Settings → Encoding
  2. Set Max Concurrent Jobs to lower value (e.g., 1-2 instead of 4)
  3. Save settings
This reduces temp space requirements but slows overall throughput.
4

Increase Temp Directory Size

Expand temp storage capacity:Option 1: Move to larger partition
Option 2: Add more disk space to existing partition
  • Expand virtual disk (if VM/LXC)
  • Add physical disk and extend volume group
  • Clean up other files on same partition
5

Enable Two-Pass Encoding (Smaller Temps)

Two-pass encoding uses less temp space:In Settings → Encoding Presets, use presets with:
  • Lower CRF values (e.g., CRF 23 instead of 18)
  • Slower presets (e.g., medium instead of fast)
Trade-off: Slower encoding speed for less temp space.
Minimum free space formula: Free Space = (Largest Video × 2) × Concurrent JobsExample: 50GB video, 4 concurrent jobs = 400GB minimum

Symptom

Encoding starts but immediately fails with:

Cause

FFmpeg couldn’t create temporary file or BitBonsai couldn’t detect it. Possible reasons:
  • NFS mount delay (file created but not visible yet)
  • Insufficient disk space
  • Permission issues on temp directory
  • Slow storage (HDD instead of SSD)

Fix

1

Check Disk Space

Verify temp directory has sufficient free space:
If low on space:
  • Clear old temp files: rm -rf /tmp/bitbonsai/*
  • Reduce concurrent jobs (fewer jobs = less temp space used)
  • Move temp directory to larger partition
2

Verify Permissions

Check temp directory is writable:
Fix permissions:
3

Check NFS Mount Status

If using NFS shared storage:
4

Increase Retry Delays (Advanced)

For slow NFS mounts, increase detection retries:Edit apps/backend/src/encoding/encoding-processor.service.ts:
Rebuild backend container.
Use local SSD/NVMe for /tmp/bitbonsai instead of NFS for better performance and reliability.