-
Notifications
You must be signed in to change notification settings - Fork 62
Description
We have been experiencing an issue where an error connecting to Redis crashes our A127 worker threads. This is acceptable sometimes but when a machine is being added or removed this causes a large number of errors and renders our server unusable until Redis comes back up.
The root cause of this is that the Redis NPM module emits an error
event when something goes wrong outside a request with a callback — for example while flushing the cache. When an error
event is emitted and nothing is listening to it, Node treats it as the unhandled exception it is, and destroys the thread. Adding a listener resolves the issue.
volos-cache-common
needs to give users a way of handling internal errors, and volos-cache-redis
needs to map that functionality onto this.client
(which actually emits the errors).