Troubleshooting
This guide lists common problems you might encounter while running VideoCMS and how to solve them.
Where are the logs?
First, always check the logs. They provide the exact error message coming from the backend or ffmpeg.
# View logs for the main service
docker compose logs -f videocmsUpload Issues
Upload stuck at 0% or "Network Error"
- Cause: Your reverse proxy (Nginx/Cloudflare) might be blocking the request body.
- Solution:
- Nginx: Ensure
client_max_body_sizeis larger than your Max Upload Chunk Size (default 20MB). We recommend setting it to50Mor higher. - Cloudflare: Free accounts limit upload bodies to 100MB. Ensure your
MaxUploadChunkSizein the VideoCMS config is set to50000000(50MB) or less.
- Nginx: Ensure
- Cause: CORS issues if
BaseUrlis not set correctly. - Solution: Check your browser's dev tools (Console/Network tab). If you see CORS errors, ensure the admin panel
BaseUrlmatches your public domain.
"Exceeded max upload sessions"
- Cause: Too many users are uploading at once, or you have "ghost" sessions from failed uploads.
- Solution:
- Increase
MaxUploadSessionsin the Admin Config. - Wait for the automatic cleanup (resumable upload sessions expire after 24 hours).
- Increase
tus PATCH logs mention NetworkTimeoutError or ERR_UNEXPECTED_EOF
NetworkTimeoutError ... feature not supported: A Go response-writer wrapper is hidinghttp.ResponseControllerfrom tusd. VideoCMS' built-in tus wrapper forwards this correctly; if you add custom Go middleware around/api/uploads, make sure the wrapper implementsUnwrap() http.ResponseWriter.ERR_UNEXPECTED_EOF: A PATCH request ended before the current chunk finished. This is normally caused by a paused upload, browser reload, network interruption, or a proxy closing the request. The browser uploader retries and resumes from the server offset.- If it repeats constantly: Check that your reverse proxy allows tus
POST,HEAD,PATCH,DELETE, andOPTIONS, and that its request body limit is at leastMaxUploadChunkSize.
Upload request is blocked as mixed content
- Cause: The browser page is HTTPS, but an old or incorrect tus upload URL is HTTP.
- Solution: Set
BaseUrlto the public HTTPS URL of your VideoCMS instance. Ensure your reverse proxy forwards the originalHostheader andX-Forwarded-Proto. In the browser Network tab, inspect the firstPOST /api/uploadsresponse and confirm itsLocationheader starts withhttps://.
Upload fails at the end with 413
- Cause: With parallel tus uploads, the last request concatenates the partial uploads into one final upload. If the full file is larger than
MaxUploadFilesize, tus rejects that final request withERR_MAX_SIZE_EXCEEDED. - Solution: Raise
MaxUploadFilesizein the admin config or upload a smaller file. If the failure happens during chunk transfer instead of at the end, checkMaxUploadChunkSizeand your reverse proxy body limit.
Encoding / FFmpeg Issues
Video stays in "Processing" forever
- Cause: FFmpeg crashed or was killed by the system (OOM - Out of Memory).
- Solution:
- Check the logs:
docker compose logs videocms | grep ffmpeg. - If you see "Killed", your server ran out of RAM. Increase your server's RAM or add swap space.
- If you see "Permission denied", check if the
./videosfolder is writable by the container user.
- Check the logs:
"Audio/Video encoding type didn't match"
- Cause: The uploaded file uses a codec that your installed version of FFmpeg doesn't support or can't decode.
- Solution: Try re-encoding the video to a standard format (H.264/AAC) on your computer using Handbrake before uploading.
Database Issues
"Database is locked"
- Cause: SQLite can only handle one write operation at a time. High traffic or a slow disk can cause this.
- Solution:
- VideoCMS uses WAL mode to mitigate this, but extremely high concurrency might still trigger it.
- Ensure your database is on a fast local disk (SSD/NVMe), not a network share (NFS/CIFS).
Permission Issues
"mkdir: cannot create directory ... Permission denied"
- Cause: The Docker container does not have ownership of the mapped volumes.
- Solution: Run the following command to fix ownership (assuming standard docker user):bash
chown -R 1000:1000 ./videos ./database
Performance
Video playback buffers frequently
When users experience buffering, it is rarely the CPU's fault. VideoCMS runs FFmpeg with a high niceness level, meaning the system prioritizes the API and web traffic over background encoding tasks. If the web server is responsive but video segments load slowly, you need to investigate other bottlenecks.
1. Network Bandwidth
The most common cause is insufficient uplink from your server to the internet or a specific region.
- Test Raw Bandwidth: Run a speed test to a known high-bandwidth node.bash
# Using iperf3 to test raw throughput (multi-threaded) iperf3 -c ping.online.net -p 5201 -P 30 - Check Real-time Usage: Use
nloadoriftopto see if your server's network interface is hitting its limit during peak hours.
2. Network Routing (Peering)
Sometimes the "raw" speed is fine, but the route between your server and the user is unoptimal or congested.
- Investigation: Ask the user for their IP and run a traceroute or
mtrfrom the server to them.bash# Check for packet loss and latency at each hop mtr -rw [USER_IP] - Solution: Using a CDN like Cloudflare can drastically improve this by serving segments from a PoP (Point of Presence) closer to the user.
3. Storage I/O (Disk Speed)
If you are using slow HDDs or a congested network share (NFS/CIFS), the disk might not be able to read the video segments fast enough for multiple concurrent viewers.
- Check I/O Wait: Run
toporhtopand look at the%wa(IO Wait) percentage. If this is consistently above 10-15%, your disks are struggling to keep up. - Monitor Disk Activity: Use
iotopto see which process is saturated.bash# See real-time disk read/write speeds per process iotop -o - Solution: Move the
videosdirectory to an SSD or NVMe drive.
4. Memory and Swapping
If the server runs out of RAM, it will start "swapping" to the disk, which is extremely slow and causes the entire system to lag.
- Check Swap Usage: Run
free -m. IfSwapis heavily used, your server needs more RAM.bashfree -m
