-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors from the redis library are ignored #12
Comments
+1 this is preventing this being used in production for me. Myspace's sharded version seems to work better and supports unsharded use anyway so I will try that for now... |
For anyone encountering this problem, and looking at the countless other forks that are out there, you should simply check out Gitter's fork (which is the PR in which #13 is based). The fork is often updated and regularly pulls in changes from this original branch as well. This is how to set it up // attach listeners for the various redis events that might arise, like 'error','end','connect','reconnecting'
function attachListeners (redisClientInstance, clientName) {
redisClientInstance.on('error',function onRedisError (error) {
logger.error(util.format('Redis (%s) reported error: %s', clientName, error.message));
});
// other events ...
});
redisClient = redis.createClient(redisConfig.port, redisConfig.host, redisConfig);
subscriberRedisClient = redis.createClient(redisConfig.port, redisConfig.host, redisConfig);
attachListeners(redisClient, 'faye redis client');
attachListeners(subscriberRedisClient, 'faye redis subscriber client');
var engineConfig = {
type : FayeRedisEngine,
client : redisClient,
subscriberClient : subscriberRedisClient,
};
var nodeAdapterOptions = {
mount : config.faye.mount,
timeout : config.faye.timeout,
engine : engineConfig
};
var bayeux = new faye.NodeAdapter(nodeAdapterOptions); |
@joeandaverde, would not know. The GitterHq fork was fine until I left the project I was using it in a year ago. The PR for this is still sitting idle, so I think you have the answer to your second question :-) |
Hi!
We are currently using the library and we experience critical issues with it. Sometimes , due to network errors, our redis server becomes unreachable for a small amount of time, creating errors such as:
After some investigation we realised that most errors from the redis library are ignored and that there's no handler for the default
error
event of boththis._redis
andthis._subscriber
.Also, in most callbacks, the error event is ignored, being an open door to unhandled exceptions.
i.e. In the following, when
error
is defined,clients
isn't:Throwing
TypeError: Cannot call method 'forEach' of undefined
.Hope we can help to get this fixed. Thanks!
The text was updated successfully, but these errors were encountered: