-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
Description
Code snippet for connecting the redis is below.
this.client = redis.createClient({
socket: { host: redisHost, port: REDISPORT},
});
this.client.connect();
this.client.on("error", (err) => log.error("Error in redis :", err));
The error we got in our logs is below.
ConnectionTimeoutError: Connection timeout
at Socket.<anonymous> (/workspace/node_modules/@redis/client/dist/lib/client/socket.js:178:124)
at Object.onceWrapper (node:events:627:28)
at Socket.emit (node:events:513:28)
at Socket.emit (node:domain:489:12)
at Socket._onTimeout (node:net:550:8)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
We also tried configuring connectTimeout for 10 seconds in the createClient after that we didn't get this error. Should we have to configure the timeout ?
Can we have a proper solution or a work around for this Connection Timeout Error?
Node.js Version
v16.19.1
Redis Server Version
6.2.7
Node Redis Version
4.6.7
Platform
Google appengine
Logs
No response
AlexanderSlaa