Hi all,
I’m attempting to setup PeerTube on Docker with Traefik. The PeerTube container spews Redis-related errors as follows (for all job workers):
[<my host>:443] 2025-03-19 15:56:13.742 error: Error in job worker video-transcription. {
"err": {
"stack": "ReplyError: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.\n at Worker.waitForJob (/app/node_modules/bullmq/dist/cjs/classes/worker.js:364:50)\n at Worker._getNextJob (/app/node_modules/bullmq/dist/cjs/classes/worker.js:288:33)\n at /app/node_modules/bullmq/dist/cjs/classes/worker.js:227:66\n at Worker.retryIfFailed (/app/node_modules/bullmq/dist/cjs/classes/worker.js:740:30)\n at Worker.mainLoop (/app/node_modules/bullmq/dist/cjs/classes/worker.js:227:41)\n at async Worker.run (/app/node_modules/bullmq/dist/cjs/classes/worker.js:199:13)\n at async Promise.all (index 0)\n at async Promise.all (index 27)",
"message": "MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.",
"command": {
"name": "bzpopmin",
"args": [
"bull-<my host>:video-transcription:marker",
"10"
]
}
}
}
My brief researched revealed that Redis required the addition of vm.overcommit_memory = 1
to /etc/sysctl.conf
plus a reboot. Unfortunately, this did not fix the issue. I also tried allocating a Docker volume to Redis and chmoding the shared folder 777 to rule out permission issues. Meanwhile, there aren’t any issues in the Redis container log:
1:C 19 Mar 2025 15:56:08.066 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 19 Mar 2025 15:56:08.066 # Redis version=6.2.17, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 19 Mar 2025 15:56:08.066 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 19 Mar 2025 15:56:08.067 * monotonic clock: POSIX clock_gettime
1:M 19 Mar 2025 15:56:08.067 * Running mode=standalone, port=6379.
1:M 19 Mar 2025 15:56:08.068 # Server initialized
1:M 19 Mar 2025 15:56:08.068 * Ready to accept connections
These errors don’t seem ignoble as uploading fails (The server encountered an error
).
Here’s my docker-compose.yml
file:
services:
# You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local
#webserver:
#image: chocobozzz/peertube-webserver:latest
# If you don't want to use the official image and build one from sources:
# build:
# context: .
# dockerfile: ./support/docker/production/Dockerfile.nginx
#env_file:
#- .env
#ports:
#- "80:80"
#- "443:443"
#volumes:
#- type: bind
# Switch sources if you downloaded the whole repository
#source: ../../nginx/peertube
#source: ./docker-volume/nginx/peertube
#target: /etc/nginx/conf.d/peertube.template
#- assets:/var/www/peertube/peertube-latest/client/dist:ro
#- ./docker-volume/data:/var/www/peertube/storage
#- certbot-www:/var/www/certbot
#- ./docker-volume/certbot/conf:/etc/letsencrypt
#depends_on:
#- peertube
#restart: "always"
# You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local
#certbot:
#container_name: certbot
#image: certbot/certbot
#volumes:
#- ./docker-volume/certbot/conf:/etc/letsencrypt
#- certbot-www:/var/www/certbot
#restart: unless-stopped
#entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;"
#depends_on:
#- webserver
peertube:
# If you don't want to use the official image and build one from sources:
# build:
# context: .
# dockerfile: ./support/docker/production/Dockerfile.bookworm
image: chocobozzz/peertube:production-bookworm
# Use a static IP for this container because nginx does not handle proxy host change without reload
# This container could be restarted on crash or until the postgresql database is ready for connection
networks:
servnet:
#default:
#ipv4_address: 172.18.0.42
#ipv6_address: fdab:e4b3:21a2:ef1b::42
env_file:
- .env
ports:
- "1935:1935" # Comment if you don't want to use the live feature
#- "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
volumes:
# Remove the following line if you want to use another webserver/proxy or test PeerTube in local
#- assets:/app/client/dist
- ./docker-volume/data:/data
- ./docker-volume/config:/config
depends_on:
- postgres
- redis
- postfix
restart: "always"
labels:
- "traefik.enable=true"
- "traefik.http.services.peertube.loadbalancer.server.port=9000"
- "traefik.http.routers.peertube.rule=Host(`<my host>`)"
- "traefik.http.routers.peertube.entrypoints=websecure"
- "traefik.http.routers.peertube.tls.certresolver=production"
postgres:
image: postgres:13-alpine
env_file:
- .env
volumes:
- ./docker-volume/db:/var/lib/postgresql/data
restart: "always"
networks:
- servnet
redis:
image: redis:6-alpine
volumes:
- ./docker-volume/redis:/data
restart: "always"
#command: redis-server --save 60 1 --loglevel debug
#command: redis-server --save "" --appendonly no --loglevel debug
networks:
- servnet
postfix:
image: mwader/postfix-relay
env_file:
- .env
volumes:
- ./docker-volume/opendkim/keys:/etc/opendkim/keys
restart: "always"
networks:
- servnet
networks:
servnet:
driver: bridge
external: true
#default:
#enable_ipv6: true
#ipam:
#driver: default
#config:
#- subnet: 172.18.0.0/16
#- subnet: fdab:e4b3:21a2:ef1b::/64