New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscriptions do not receive data after reconnect #1252
Comments
Thanks for your detailed description, however I have not been able to reproduce it yet. When I issue a When I manually stop the redis server and start it again it seems to receive messages fine. I have been testing this on Mac, will try to reproduce it too on Linux |
Hmmm... that's interesting. It was occurring with a totally stock redis installation built from source. The only option I changed was to allow remote connections. I'll take a look shortly and see if I can figure out what's up. @jdegger |
@jdegger I'm not able to repro locally, only in AWS under super specific conditions. I can create a second copy of this AMI and provide code that will allow you to reproduce but it's seemingly something specific to running in AWS. Let me know if you're interested... otherwise I'd say go ahead and close the issue |
Ok, finally able to reproduce reliably. There are a few requirements:
What you will see is that every 2 hours (at least for me) is an ECONNRESET error. At this point, the socket appears to still be open in redis but maybe the node process has lost a reference to it and opened a new socket? Overnight I had like 1 client connected per 2 hour block plus the currently running process when issuing It's important to note that the clients were all successfully reconnecting but not receiving data. I have a hunch that the data was being pushed out, but to the old connection not the new one... but that's totally a hunch. Now, i'm not 100% sure if this is a node_redis bug or actually a bug with node, so if this is the wrong place to file just let me know. I'd be happy to try and debug/step through but have limited time. The fix was to set |
Our also shows that ECONNRESET error happens every 2 hours. But I checked tcp-keepalive, it is 300
|
node_redis: 2.7.1
redis: 3.2
platform: Amazon linux
description:
When redis' snapshotting occurs it disconnects the redis client. The client reconnects and resubscribes, however, they no longer receive data. This can be reproduced by issuing a
SAVE
command via the redis-cli.JS
Logs
Initial connect
Issuing a SAVE command in redis-cli
It is at this point that the client will no longer receive any data published to the channel test. If you have any questions or need more info to reproduce please let me know.
The text was updated successfully, but these errors were encountered: