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
fix(auth/redis): fail-fast circuit breaker + offline queue off
OAuth was hanging 18-23s per request when REDIS_URL was set but Redis
wasn't actually running. ioredis was buffering commands and retrying
on every get/set, multiplied by the number of secondaryStorage calls
Better Auth makes per request.
- enableOfflineQueue: false — commands fail instantly, no buffering
- connectTimeout: 500ms
- maxRetriesPerRequest: 1
- process-local circuit breaker — once 'error' fires, get/set/delete
short-circuit to null/no-op until the 'ready' event resets it
- single connection-error log per outage; 'reconnected' log on
recovery
NOTE: when REDIS_URL is set but unreachable, Better Auth still uses
the in-memory state store but secondaryStorage calls return null —
which means OAuth state, magic-link tokens etc. cannot round-trip.
For local dev: run `pnpm redis:start` OR unset REDIS_URL in .env.
0 commit comments