BitBonsai is designed to self-heal from most issues, but occasionally you may need to intervene manually. This guide covers common problems and their solutions.
New to troubleshooting? Most issues are automatically fixed by BitBonsai’s auto-healing systems. See self-healing in the glossary.
# Create mount point if missingmkdir -p /mnt/bitbonsai# Test mountmount -t nfs 192.168.1.100:/mnt/user/bitbonsai /mnt/bitbonsai# Verify accessls -la /mnt/bitbonsaitouch /mnt/bitbonsai/test.txtrm /mnt/bitbonsai/test.txt
If mount fails, check network connectivity:
Copy
ping 192.168.1.100showmount -e 192.168.1.100
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:
Copy
# On child nodesystemctl restart bitbonsai-backendjournalctl -u bitbonsai-backend -f
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.
# On worker nodedf -h /tmp/bitbonsai# Should have 2× largest video file size available# Example: If encoding 50GB file, need 100GB+ free
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:
Copy
# On worker nodels -ld /tmp/bitbonsai# Should be: drwxrwxrwx or owned by container user# Test write accesstouch /tmp/bitbonsai/test.txtrm /tmp/bitbonsai/test.txt
Fix permissions:
Copy
chmod 777 /tmp/bitbonsai# OR set ownership to container user (e.g., UID 1000)chown -R 1000:1000 /tmp/bitbonsai
3
Check NFS Mount Status
If using NFS shared storage:
Copy
# Verify mount activemount | grep bitbonsai# Test write latencytime dd if=/dev/zero of=/mnt/bitbonsai/test bs=1M count=100rm /mnt/bitbonsai/test# High latency (>500ms) indicates network issues
4
Increase Retry Delays (Advanced)
For slow NFS mounts, increase detection retries:Edit apps/backend/src/encoding/encoding-processor.service.ts:
Copy
const MAX_RETRIES = 20; // Increase from 10const RETRY_DELAY_MS = 3000; // 3 seconds instead of 2
Rebuild backend container.
Use local SSD/NVMe for /tmp/bitbonsai instead of NFS for better performance and reliability.
# Test pingping -c 3 192.168.1.100# Test port connectivitync -zv 192.168.1.100 3100# Should show: Connection succeeded# Test HTTP accesscurl -v http://192.168.1.100:3100/health# Should return: {"status":"ok"}
# Check container statusdocker compose ps bitbonsai-backend# View logs for errorsdocker compose logs bitbonsai-backend# Restart if neededdocker compose restart bitbonsai-backend
4
Validate API Key Configuration
Worker nodes must provide valid API key to connect:On child node, check environment variables:
Copy
cat /etc/systemd/system/bitbonsai-backend.service# Should contain:Environment="MAIN_NODE_URL=http://192.168.1.100:3100"Environment="NODE_API_KEY=your-api-key-here"
Verify API key matches main node configuration:
Copy
# On main nodedocker compose exec bitbonsai-backend env | grep NODE_API_KEY
docker compose ps bitbonsai-backend# Should show: Up (healthy)# Check logs for startup errorsdocker compose logs bitbonsai-backend | tail -50
If not running:
Copy
docker compose up -d bitbonsai-backend
2
Test Backend API Directly
Copy
# From host machinecurl http://localhost:3100/health# Should return: {"status":"ok"}# If failed, check port mappingdocker compose ps bitbonsai-backend# Ports should show: 0.0.0.0:3100->3100/tcp
3
Check API_URL Configuration
Verify frontend knows where to find backend:
Copy
docker compose exec bitbonsai-frontend env | grep API_URL# Should be:# API_URL=http://bitbonsai-backend:3100 (internal Docker network)# OR# API_URL=http://localhost:3100 (if accessing from outside)
# Check temp directory usagedf -h /path/to/temp# Check size of temp filesdu -sh /path/to/temp/bitbonsai/*# Find largest filesfind /path/to/temp -type f -exec du -h {} + | sort -rh | head -10
2
Clear Old Temporary Files
Copy
# BitBonsai should auto-clean, but manual cleanup if needed:docker compose exec bitbonsai-backend rm -rf /tmp/bitbonsai/*# OR from host (if mounted)rm -rf /path/to/temp/bitbonsai/*
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:
Navigate to Settings → Encoding
Set Max Concurrent Jobs to lower value (e.g., 1-2 instead of 4)
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
Copy
# In docker-compose.ymlbitbonsai-backend: volumes: - /mnt/larger-disk/bitbonsai-temp:/tmp/bitbonsai
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
Reset all jobs to fresh state without losing configuration:
Copy
-- Connect to databasedocker compose exec postgres psql -U bitbonsai -d bitbonsai-- Reset all jobs to QUEUEDUPDATE "EncodingJob"SET status = 'QUEUED', progress = 0, "assignedNodeId" = NULL, "startedAt" = NULL, "completedAt" = NULLWHERE status IN ('ENCODING', 'CORRUPTED', 'FAILED');-- Verify resetSELECT status, COUNT(*) FROM "EncodingJob" GROUP BY status;