UnhandledPromiseRejectionWarning: AbortError: Redis connection lost and command aborted. It might have been processed.
at RedisClient.flush_and_error (C:\workspace\MainData\node_modules\redis\index.js:362:23)
at RedisClient.connection_gone (C:\workspace\MainData\node_modules\redis\index.js:664:14)
at RedisClient.on_error (C:\workspace\MainData\node_modules\redis\index.js:410:10)
at Socket.<anonymous> (C:\workspace\MainData\node_modules\redis\index.js:279:14)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:8088) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8088) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:8088) UnhandledPromiseRejectionWarning: AbortError: Redis connection lost and command aborted. It might have been processed.
at RedisClient.flush_and_error (C:\workspace\MainData\node_modules\redis\index.js:362:23)
at RedisClient.connection_gone (C:\workspace\MainData\node_modules\redis\index.js:664:14)
at RedisClient.on_error (C:\workspace\MainData\node_modules\redis\index.js:410:10)
at Socket.<anonymous> (C:\workspace\MainData\node_modules\redis\index.js:279:14)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:8088) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
nodejs连接redis,经常掉线,然后重新连接,报错:Redis connection lost and command aborted. It might have been processed.
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- @baby张 2019-10-12 14:56关注
可以在node里用websocket 链接redis频道,并监听,里面写个轮循,断了就去重新链接,我的这个博客看下(websocket(Redis,node, react 三方处理)),希望对你有帮助。
https://blog.csdn.net/weixin_43648947/article/details/100009465
解决 无用评论 打赏 举报