redis连接处于断开状态:超过连接超时它可能已经被nodejs+async redis处理过了

f0ofjuux  于 2021-06-08  发布在  Redis
关注(0)|答案(0)|浏览(277)

我正在尝试连接到aws redis弹性缓存,但我一直收到这个错误。我不确定我在这里做错了什么,非常感谢您的帮助。这是我的密码

async function testRedis(){
try{
 const asyncRedis = require("async-redis");
        const client = asyncRedis.createClient({
            port: 6379,
            host: 'myHost',
            auth_pass: redisPassword,
            connect_timeout: 900,
            enable_offline_queue: false
        })
        const response = await client.set("test", "response");
        const redisResp = await client.get("test");
        const connStatus = client.quit()
        console.log('connection status::', connStatus)
    } catch (err) {
        console.log(err)
    }
}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题