REDIS error - Master/Replica switch doesn't happen when Master goes offline

As some of you are using Redis with Meteor as well I hope you can help me with this error.

I’ve installed Redis on Linode via the latest Docker image (version 7.0.5 - http://download.redis.io/releases/redis-7.0.5.tar.gz) and it’s working fine for a couple of hours until the Master becomes unresponsive and the switch to another Replica to become the new Master doesn’t seem to happen.

From the log file:

1:S 30 Nov 2022 04:58:45.529 * Connecting to MASTER 185.xxx.yyy.zzz:port,
1:S 30 Nov 2022 04:58:45.530 * MASTER <-> REPLICA sync started,
1:S 30 Nov 2022 04:58:45.787 * Non blocking connect for SYNC fired the event.,
1:S 30 Nov 2022 04:58:46.758 # Failed to read response from the server: Connection reset by peer,
1:S 30 Nov 2022 04:58:46.758 # Master did not respond to command during SYNC handshake,

Log file on restart of the Redis container:

1:C 30 Nov 2022 05:01:45.882 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo,
1:C 30 Nov 2022 05:01:45.883 # Redis version=7.0.5, bits=64, commit=00000000, modified=0, pid=1, just started,
1:C 30 Nov 2022 05:01:45.883 # 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 30 Nov 2022 05:01:45.890 * Ready to accept connections,
1:M 30 Nov 2022 05:01:45.885 * Running mode=standalone, port=6379.,
1:M 30 Nov 2022 05:01:45.884 * monotonic clock: POSIX clock_gettime,
1:M 30 Nov 2022 05:01:45.887 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.,
1:M 30 Nov 2022 05:01:45.888 # Server initialized,
1:M 30 Nov 2022 05:01:45.888 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.,
1:M 30 Nov 2022 05:01:45.889 * Loading RDB produced by version 7.0.5,
1:M 30 Nov 2022 05:01:45.889 * RDB age 39 seconds,
1:M 30 Nov 2022 05:01:45.889 * RDB memory usage when created 1.25 Mb,
1:M 30 Nov 2022 05:01:45.890 * Done loading RDB, keys loaded: 0, keys expired: 0.,
1:M 30 Nov 2022 05:01:45.890 * DB loaded from disk: 0.001 seconds

I have no clue what’s wrong, it should be straight forward.

Thanks in advance!

what’s your redis settings on your meteor app? Does it support replica? When I used redisOplog package (3 years ago), it doesn’t support replica.

Thanks for replying. To give a bit more background, I’m using Redis for the BullMQ package (https://docs.bullmq.io/), not for the redisOplog (though I might do that in the future if performance problems with arise).

I don’t have specific Redis settings on the connection from the Meteor app:

import { Queue, Worker } from 'bullmq';
const redisOptions = { host: "ww.xx.yy.zz", port: 6379 };
const workflowQueue = new Queue('workflowQueue', { connection: redisOptions });