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
I have an issue where node_redis is auto-reconnecting to redis and all queries hang indefinitely afterward. This is a related issue to that, where occasionally I will see one of the hung connections terminate with these kind of errors:
9 Aug 19:04:26 - error: Redis error: Error: Redis reply parser error: Error: Protocol error, got "\n" as reply type byte
at HiredisReplyParser.execute (.../node_modules/redis/lib/parser/hiredis.js:31:37)
at RedisClient.on_data (.../node_modules/redis/index.js:358:27)
at Socket.<anonymous> (.../node_modules/redis/index.js:93:14)
at Socket.emit (events.js:64:17)
at Socket._onReadable (net.js:678:14)
at IOWatcher.onReadable [as callback] (net.js:177:10)
9 Aug 19:14:27 - error: Redis error: Error: Redis reply parser error: Error: Protocol error, got "r" as reply type byte
at HiredisReplyParser.execute (.../node_modules/redis/lib/parser/hiredis.js:31:37)
at RedisClient.on_data (.../node_modules/redis/index.js:358:27)
at Socket.<anonymous> (.../node_modules/redis/index.js:93:14)
at Socket.emit (events.js:64:17)
at Socket._onReadable (net.js:678:14)
at IOWatcher.onReadable [as callback] (net.js:177:10)
@mranney: This can be fixed by moving the initializer for this.reply_parser to the on_connect function or the "connect" callback on the socket. This also fixes #126 since it prevents more data to be pushed to a parser in an erroneous state.
Activity
pietern commentedon Aug 11, 2011
@mranney: This can be fixed by moving the initializer for
this.reply_parserto theon_connectfunction or the "connect" callback on the socket. This also fixes #126 since it prevents more data to be pushed to a parser in an erroneous state.Fix for [GH-127]
mranney commentedon Aug 11, 2011
@jhurliman: can you please try this change and see if it fixes your issue?
jhurliman commentedon Aug 11, 2011
Upgraded to the new version just now, I'll let you know how it goes.
jhurliman commentedon Aug 12, 2011
Everything looks good so far, thanks!
mranney commentedon Aug 12, 2011
Awesome, thanks guys. I'll roll a new version for npm with this fix.