| title | Video Processing |
|---|---|
| description | Configure video processing workers, retries, and cleanup settings |
Quick reference for all available video processing parameters:
| Parameter | Description |
|---|---|
VIDEO_MAX_CONCURRENT |
Maximum concurrent video jobs |
VIDEO_JOB_RETRY_MAX |
Maximum retry attempts |
VIDEO_JOB_CLEANUP_HOURS |
Job cleanup time |
VIDEO_WORKER_POLL_INTERVAL_MS |
Worker polling interval |
Maximum number of video jobs processed simultaneously.
Auto-detection:
- Automatically detected based on available RAM (1 worker per 2GB)
- Maximum: 16 workers
Examples:
4- 4 concurrent jobs (default for 8GB RAM)8- 8 concurrent jobs (for 16GB RAM)2- 2 concurrent jobs (for resource-constrained environments)16- Maximum concurrent jobs
Maximum number of retry attempts for failed video jobs.
Examples:
3- Default (3 retry attempts)5- More retries for unreliable networks1- Single retry for faster failure detection0- No retries (not recommended)
Number of hours after which completed or failed jobs are cleaned up from the database.
Examples:
24- Clean up after 1 day (default)48- Keep jobs for 2 days168- Keep jobs for 1 week1- Clean up after 1 hour (aggressive cleanup)
Interval in milliseconds at which the worker polls for new video jobs.
Examples:
1000- Poll every 1 second (default)500- Poll every 500ms (faster job pickup)2000- Poll every 2 seconds (reduces CPU usage)5000- Poll every 5 seconds (lower resource usage)
VIDEO_MAX_CONCURRENT=2
VIDEO_JOB_RETRY_MAX=3
VIDEO_JOB_CLEANUP_HOURS=1
VIDEO_WORKER_POLL_INTERVAL_MS=1000Development configuration with lower concurrency and faster cleanup.
VIDEO_MAX_CONCURRENT=8
VIDEO_JOB_RETRY_MAX=5
VIDEO_JOB_CLEANUP_HOURS=48
VIDEO_WORKER_POLL_INTERVAL_MS=500High-performance production setup with more workers and faster polling.
VIDEO_MAX_CONCURRENT=1
VIDEO_JOB_RETRY_MAX=2
VIDEO_JOB_CLEANUP_HOURS=12
VIDEO_WORKER_POLL_INTERVAL_MS=2000Configuration for environments with limited CPU or memory.
# VIDEO_MAX_CONCURRENT not set - auto-detected
VIDEO_JOB_RETRY_MAX=3
VIDEO_JOB_CLEANUP_HOURS=24
VIDEO_WORKER_POLL_INTERVAL_MS=1000Let the system auto-detect optimal concurrency based on available RAM.
Balance `VIDEO_MAX_CONCURRENT` with available CPU cores and RAM. Each worker uses significant resources. Set `VIDEO_JOB_RETRY_MAX` based on network reliability and job criticality. Adjust `VIDEO_JOB_CLEANUP_HOURS` to balance database size and debugging needs. Lower `VIDEO_WORKER_POLL_INTERVAL_MS` for faster processing, higher for reduced CPU usage. Video processing is resource-intensive. Monitor CPU, memory, and disk I/O when adjusting these parameters. Start with default values and tune based on your specific workload.