I have a docker-compose file with 4 containers, one of which is Redis. The image builds up properly and runs properly initially but after some time (sometimes it happens within 10 minutes or sometimes after a few hours) the Redis start throwing errors and my container 'worker' fails.
docker-compose.yml
version: '3.7'
services:
web:
build:
context: .
command: gunicorn EmotAPI.wsgi:application --bind 0.0.0.0:8000
ports:
- "8000:8000"
container_name: emot_web
depends_on:
- redis
worker:
build:
context: .
command: python manage.py rqworker default
depends_on:
- web
- redis
nginx:
build: ./nginx
ports:
- "80:80"
depends_on:
- web
redis:
image: "redis:latest"
ports:
- "6379:6379"
redis error log (after which functions start to fail)
1:S 06 Jul 2022 08:03:53.556 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:03:53.556 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:03:54.567 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:03:54.567 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:03:56.509 # Wrong signature trying to load DB from file
1:S 06 Jul 2022 08:03:56.509 # Failed trying to load the MASTER synchronization DB from disk: Invalid argument
1:S 06 Jul 2022 08:03:56.870 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:03:56.870 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:03:57.588 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:03:57.588 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:03:58.581 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:03:58.581 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:03:59.596 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:03:59.596 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:00.612 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:00.612 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:01.609 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:01.609 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:02.613 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:02.613 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:03.613 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:03.613 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:04.631 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:04.631 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:05.624 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:05.624 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:06.625 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:06.625 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:07.653 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:07.653 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:08.658 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:08.658 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:09.648 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:09.648 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:10.659 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:10.659 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:11.674 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:11.674 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:12.670 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:12.670 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:13.665 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:13.665 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:14.686 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:14.686 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:16.669 # Wrong signature trying to load DB from file
1:S 06 Jul 2022 08:04:16.669 # Failed trying to load the MASTER synchronization DB from disk: Invalid argument
1:S 06 Jul 2022 08:04:17.056 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:17.057 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:17.692 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:17.692 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:18.709 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:18.709 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:19.716 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:19.716 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:20.712 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:20.712 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:21.717 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:21.717 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:22.731 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:22.731 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:23.732 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:23.732 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:24.743 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:24.743 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:25.739 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:25.739 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:26.740 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:26.740 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:27.751 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:27.751 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:28.752 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:28.752 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:29.768 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:29.768 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:30.775 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:30.775 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:31.772 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:31.772 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:32.761 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:32.761 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:33.796 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:33.796 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:34.794 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:34.794 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:36.756 # Wrong signature trying to load DB from file
1:S 06 Jul 2022 08:04:36.756 # Failed trying to load the MASTER synchronization DB from disk: Invalid argument
1:S 06 Jul 2022 08:04:37.126 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:37.126 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:37.811 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:37.811 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:38.813 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:38.813 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:39.821 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:39.821 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:40.818 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:40.818 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:41.832 # Failed to read response from the server: Connection reset by peer
1:S 06 Jul 2022 08:04:41.832 # Master did not respond to command during SYNC handshake
1:S 06 Jul 2022 08:04:42.830 # Failed to read response from the server: Operation in progress
1:S 06 Jul 2022 08:04:42.830 # Master did not respond to command during SYNC handshake
I am unable to find a solution for it. Also, I am quite new to Redis so sorry if it's just a silly question, but there were no resources available so I had to resort to asking a question.