node.js - Questions about redis connection
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 13:20:28
0
1
923

I recently wrote a project using nodeJS and connected to remote redis. When using the system after deployment, the error of redis connection failure occasionally occurs, so it needs to be restarted. However, the connection failure or timeout has become more frequent recently. It's happening more and more often. I don't know what's causing it and how to solve it?

过去多啦不再A梦
过去多啦不再A梦

reply all(1)
黄舟

redis的配置有最大空闲连接时间,你可以先看看配置是什么CONFIG GET TIMEOUT
。如果 CONGIG SET TIMEOUT 0 设置为0,则redisThe server will not actively disconnect.

Of course, the redis driver of nodejs should check the survival status of the connection before executing the query command, and then execute the query command.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template