Skip to content

Erroring Redis modules throw uncatchable errors. #97

@tayloa45

Description

@tayloa45

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions