I am using `node_redis` to connect from a Nodejitsu app to OpenRedis,
both running on Joyent.
Frequently the Nodejitsu app loses connection. Excerpt from the logs:
[12/22 12:45:07 GMT+0100] Redis connection to
165.225.131.162:10657 failed - read ETIMEDOUT
[12/22 12:45:07 GMT+0100] Redis connection to
165.225.131.162:10657 failed - read ETIMEDOUT
[...]
[12/22 12:45:07 GMT+0100] Redis connection to
165.225.131.162:10657 failed - read ETIMEDOUT
[12/22 12:45:07 GMT+0100] Redis client: [Error: Redis connection
to 165.225.131.162:10657 failed - read ETIMEDOUT]
Now, I contacted OpenRedis, and they looked at the log of the Redis
instance and said that things look OK. In fact, the instance on
Joyent is underutilized.
Questions:
* How do I find out where the error lies?
* Does `node_redis` support some kind of automatic reconnect?
The code that the Nodejitsu app uses to connect to Redis:
var port = process.env.REDIS_PORT || 6379,
host = process.env.REDIS_HOST || '127.0.0.1',
password = process.env.REDIS_PASSWORD,
redisClient = require('redis').createClient(port, host);
if (password) {
redisClient.auth(password);
}
redisClient.on('error', function (err) {
console.error('Redis client:', err);
});
redisClient.setMaxListeners(0);
module.exports = redisClient;
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en