trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

fix: support for IPv6 redis connections

Open mittalyashu opened this issue 1 year ago • 1 comments

Closes #

✅ Checklist

  • [x] I have followed every step in the contributing guide
  • [ ] The PR title follows the convention.
  • [ ] I ran and tested the code works

Testing

While trying to self-host it, I was trying to add a Redis instance as result, I was getting this error in the logs.

[ioredis] Unhandled error event: Error: connect ETIMEDOUT
    at TLSSocket.<anonymous> (/triggerdotdev/node_modules/.pnpm/[email protected]/node_modules/ioredis/built/Redis.js:170:41)
    at Object.onceWrapper (node:events:631:28)
    at TLSSocket.emit (node:events:517:28)
    at Socket._onTimeout (node:net:598:8)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)

Changelog

By default ioredis set the connection host to IPv4.

The documentation for the family parameter are: https://nodejs.org/docs/latest-v20.x/api/net.html#socketconnectoptions-connectlistener

mittalyashu avatar Aug 14 '24 12:08 mittalyashu

⚠️ No Changeset found

Latest commit: d308bfa3992968f087c55c6a906b537feaa76e6d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Aug 14 '24 12:08 changeset-bot[bot]

Thanks for this @mittalyashu - it's quite a risky change in the current state. We'd have to add new (optional) env vars to make this configurable and keep the current default. Tricky since we started using redis in a lot more places. Plenty of clients with their own individual env vars. I'll close this for now, but happy to revisit once the new self-hosting setup is out.

nicktrn avatar Apr 23 '25 10:04 nicktrn