Skip to content

Redis unhandled connection errors crash the process #70

Description

@ANSHSINGH050404

Labels: bug, high-priority

Problem

src/redis.ts:29 creates new Redis(url) but never attaches an error event listener. The ioredis library emits an error event when the connection fails or drops — with no listener, Node.js treats it as an unhandled error and crashes the process.

This means any transient Redis outage (network blip, server restart, etc.) kills the entire test run.

Location

src/redis.ts:29

Suggested fix

Add an error event handler on the Redis client that logs the error and attempts reconnection:

client = new Redis(url);
client.on("error", (err) => {
  logger.error({ err }, "Redis connection error");
});
Also consider adding a reconnect strategy so transient failures don't permanently disable caching mid-test.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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