gray-magician-34629
11/25/2025, 11:37 AMtall-airline-16756
11/25/2025, 11:37 AMtall-airline-16756
11/25/2025, 11:38 AMcpu_cost), so at 48 vCPUs a max_cost of 4 allows roughly 48 / 4 = 12 concurrent CPU-heavy jobs per worker.
• Increasing max_cost would reserve more CPU per job and therefore reduce the number of concurrent jobs the worker will accept. If your goal is to run more concurrent egress jobs, you should lower cpu_cost (not increase it) or add/scale workers/load-balance them.
About the "twirp error: no response from server"
• This is a client-server communication failure — the Egress service did not reply to the RPC. Common causes:
◦ Egress process not running or not listening on the expected port
◦ Network / firewall / security-group rules blocking access to the instance/port
◦ Service health issues (crashing, blocked on resources)
◦ Redis or coordination problems preventing the service from accepting jobs
◦ Incorrect endpoint or credentials (e.g., LIVEKIT_WS_URL, api_key, api_secret)
• Check the Egress service health and availability endpoints (/health, /availability) if enabled, confirm the service is bound to the expected port, and inspect Egress logs around the twirp error for connection timeouts or crashes.
Next steps I recommend
1. Confirm how you deployed Egress (bare EC2 process, Docker, or Kubernetes/Helm).
2. On the EC2 instance:
◦ Verify the egress process is running and listening on the configured port (ss/netstat/docker ps).
◦ Check security group and OS firewall to ensure the port is reachable from the client.
◦ Inspect Egress logs for errors preceding the twirp message and for Redis connection errors.
1. If you want more concurrency: reduce cpu_cost (the max_cost log will reflect that change) or add more workers.
2. Share these details so I can help further:
◦ deployment method (Docker, systemd, k8s/Helm)
◦ relevant Egress config (value of cpu_cost and ports), and a few log lines around the twirp error
◦ whether Redis is reachable and any Redis-related log entries
Would you like help interpreting the Egress logs if you paste the surrounding lines and your `cpu_cost`/deployment details?
Sources: Self-hosting the Ingress Service | LiveKit docs | Self-hosting the Egress Service | LiveKit docsgray-magician-34629
11/25/2025, 11:40 AMtall-airline-16756
11/25/2025, 11:40 AMcpu_cost or scale workers) to limit simultaneous disk usage.
• Implement a cleanup process that removes local files after successful upload (cron/systemd script) or on a retention schedule.
• Monitor disk usage with alerts so you catch growth before it becomes critical.
If you want, tell me:
• how you deployed Egress (bare EC2, Docker, or k8s/Helm),
• the Egress output directory path and any cleanup settings you’ve tried,
and I’ll suggest specific cleanup commands or a simple cleanup script tailored to your setup.
Sources: RoomComposite Egress | LiveKit Docs | Universal Egress | Self-hosting the Egress Service | LiveKit docsgray-magician-34629
11/25/2025, 11:41 AMtall-airline-16756
11/25/2025, 11:42 AMfilepath, filename_prefix) — e.g., MP4 files, HLS segments (.m3u8/.ts), or WebM files created during jobs. These are safe to remove only after you verify the corresponding uploads succeeded in S3.
• Remove any unfinished/failed output files from jobs that have errored and won’t be retried.
Where to look
• If you mounted a host volume for egress outputs (recommended): check that mount path on the host (e.g., ~/livekit-egress or whatever you mapped) and delete media files there.
• If you did NOT mount a volume: files live inside the container writable layer. List large files by running a cleanup container or exec into the egress container and check common paths (container work dir or root) for large media files.
Commands you can run on the host (adjust paths and container name):
1. Check disk usage and find large files in a mounted directory:
◦ du -sh /path/to/egress/*
◦ find /path/to/egress -type f -name '*.mp4' -o -name '*.ts' -o -name '*.m3u8' -printf '%s %p\n' | sort -rn | head
1. If files are inside the container and you need to inspect:
◦ docker ps (get container name)
◦ docker exec -it <container> /bin/sh or /bin/bash
◦ Inside container: du -sh /* or find / -type f -name '*.mp4' -o -name '*.ts' -o -name '*.m3u8'
1. Remove files after confirming upload:
◦ rm /path/to/egress/file.mp4
◦ Or from container: docker exec <container> rm /path/to/file
Precautions
• Verify the file exists in S3 before deleting local copies.
• If jobs are currently running, avoid deleting files they may still be writing to.
• Consider stopping the egress container briefly if you need to safely delete many files and prevent concurrent writes.
Prevention suggestions
• Mount a dedicated host volume for egress outputs so you can manage disk usage easily.
• Add a cleanup cron job that deletes local files older than N hours after confirming uploads, e.g.:
◦ find /path/to/egress -type f -mtime +2 -name '*.mp4' -delete (adjust age)
• Monitor disk usage and alert when near capacity.
If you tell me the host mount path you used (or whether you didn’t mount a volume) and the container name, I can give exact commands tailored to your setup.
Sources: Self-hosting the Egress Service | LiveKit docs | Track egress | LiveKit docs | Recording and export | LiveKit docs