Skip to content

Conversation

@yoshifumi-kondo
Copy link

@yoshifumi-kondo yoshifumi-kondo commented Dec 16, 2025

Summary

  • Add lockAcquireTimeout option to GoTrueClientOptions (default: 60000ms)
  • Replace infinite lock timeout (-1) with configurable timeout to prevent production deadlocks
  • Users can customize timeout or set negative for infinite wait (not recommended)

Fixes #1594

Test plan

  • Build passes (npx nx build auth-js)
  • Existing tests pass
  • Manual testing with concurrent browser tabs

…ocks

Replace infinite lock timeout (-1) with configurable lockAcquireTimeout option
that defaults to 60 seconds. This prevents production deadlocks caused by
indefinite lock waiting when concurrent browser tabs or network issues
interfere with lock acquisition.

- Add lockAcquireTimeout option to GoTrueClientOptions (default: 60000ms)
- Replace all infinite timeout (-1) lock acquisitions with configurable timeout
- Users can customize the timeout or set to negative for infinite wait (not recommended)

Fixes supabase#1594
@yoshifumi-kondo yoshifumi-kondo requested review from a team as code owners December 16, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Auth] GoTrueClient uses infinite timeouts for lock acquisition causing deadlocks in production

1 participant