You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When connecting to a sentinel-enabled redis cluster, regardless of what node you connect to, you will be met with an error of ReplyError: READONLY You can't write against a read only replica.. This can be solved by disabling sentinel in the config, however this makes the redis cluster much less highly available.
kashalls
changed the title
Migrate from node package "redis" to "ioredis" for sentinel support.
Migrate from node package "redis" to "ioredis" for redis high availability support.
Jul 29, 2023
This would also fix issues if the redis instance suddenly disconnects, as if the main connected instance does a rolling update all connected services crash and have to be manually restarted.
{
level: 'error',
message: 'Socket closed unexpectedly',
stack: 'Error: Socket closed unexpectedly\n' +
' at Socket.<anonymous> (/usr/src/CommonServer/node_modules/@redis/client/dist/lib/client/socket.js:195:118)\n' +
' at Object.onceWrapper (node:events:628:26)\n' +
' at Socket.emit (node:events:513:28)\n' +
' at Socket.emit (node:domain:489:12)\n' +
' at TCP.<anonymous> (node:net:320:12)',
timestamp: '2023-08-01T20:32:49.759Z'
}
When connecting to a sentinel-enabled redis cluster, regardless of what node you connect to, you will be met with an error of
ReplyError: READONLY You can't write against a read only replica.
. This can be solved by disabling sentinel in the config, however this makes the redis cluster much less highly available.The redis package has had an issue open for sentinel support since 2012 and still has not been resolved.
I recommend switching to ioredis as other open source software has found success switching to it. See immich.
This is highly sought after as deploying a non-sentinel container makes it difficult to provide a high availability database to support this app.
The text was updated successfully, but these errors were encountered: