Closed jwoertink closed 1 year ago
Maybe related: https://github.com/ysbaddaden/pool/issues/2
i think this problem only with subscription, because it is special command, any other commands reconnects ok. This is not related to pool at all.
fixed in master
In Cable-cr we have this instance setup
https://github.com/cable-cr/cable/blob/a8f7f3d9d8218078ab270720738dc33e0858775b/src/cable/server.cr#L35
it calls
subscribe
when the server is booted, and ran within a spawnhttps://github.com/cable-cr/cable/blob/a8f7f3d9d8218078ab270720738dc33e0858775b/src/cable/server.cr#L152-L154
If the redis server gets rebooted, then that connection will throw a
Redis::CannotConnectError
, and never tries to reconnect. Currently the only way to resolve this within our app seems to be to just reboot the entire app and tell users to refresh their browsers so the websockets will all reconnect and such.Here's a local stacktrace we see when testing this by booting our app, restarting redis, then trying to send a chat message.