You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
Update: The same issue appears in volos-quota-redis, except that if a buffer size is set then it may not be possible to access the inner Redis emitter to attach a listener.
Sorry, we needed a fix we could deploy quickly, so we used a slightly hacky one which detects Redis connections in the Volos objects and listens to them directly. (It just logs the error and continues at the moment.) An elegant fix meant probably editing four modules in the repo, and we've never managed to run the unit tests, so it wasn't really practical.
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 anerror
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, andvolos-cache-redis
needs to map that functionality ontothis.client
(which actually emits the errors).The text was updated successfully, but these errors were encountered: