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
This one was pretty weird but quite serious. If you issue a BZPOPMIN command, and there is a small disconnection while the command is blocking, then it will stay blocking forever, effectively hanging the app that uses the command.
Now, one of the insane things about this issue is that to reproduce it you must use a port different than the standard 6379, and also use docker network disconnect, it is not enough to just stop the docker container running Redis:
The terminal with the node app will stay the same, with no error or nothing. If you restart the app and without disconnecting and reconnecting you try again to ZADD to the key you will get instead:
I can not reproduce this with ioredis 5.4.1, node 20.14.0, the latest redis alpine version (7.2.5) and docker 26.1.3 (colima on macos).
The terminal with the node app will stay the same, with no error or nothing.
I do get connection errors and reconnecting output as expected when disconnecting
and after a few seconds reconnecting the docker network like you described ( I also tried it with less time between the disconnect and connect docker commands (1 second) and more than 3 seconds >=10 seconds but the result is the same).
I always get the Issued BZPOPMIN command! [ 'key', 'test', '10' ]
output in the apps terminal as expected even without restarting the app.
This one was pretty weird but quite serious. If you issue a BZPOPMIN command, and there is a small disconnection while the command is blocking, then it will stay blocking forever, effectively hanging the app that uses the command.
Now, one of the insane things about this issue is that to reproduce it you must use a port different than the standard 6379, and also use docker network disconnect, it is not enough to just stop the docker container running Redis:
Try this code:
bug.mjs:
docker-compose.yml:
Start the docker container with:
Run the test with:
Results in:
Now in a different terminal, and depending on where you run the docker (I had my docker compose on directory ioredis-econnreset:
The Redis network was disconnected and connected again after 3 seconds. Open a Redis cli:
The terminal with the node app will stay the same, with no error or nothing. If you restart the app and without disconnecting and reconnecting you try again to ZADD to the key you will get instead:
Let me know if you need more information.
The text was updated successfully, but these errors were encountered: