Skip to content

fix(realtime): throttle connections based on subscription attempts#2236

Open
filipecabaco wants to merge 1 commit intomasterfrom
fix/realtime-throttle-subscriptions
Open

fix(realtime): throttle connections based on subscription attempts#2236
filipecabaco wants to merge 1 commit intomasterfrom
fix/realtime-throttle-subscriptions

Conversation

@filipecabaco
Copy link
Copy Markdown
Member

🔍 Description

throttle connections based on subscription attempts

What changed?

added a throttling mechanism using a buffer for servers and local storage for browser where we throttle subscriptions to prevent useEffect load and errors.

Why was this change needed?

currently we see users reaching easily the limits of their accounts due to what are potentially errors when it comes to disconnecting and unsubscribing channels and, by consequence, kill the websocket.

this usually happens due to bad useEffect practices.

📋 Checklist

  • I have read the Contributing Guidelines
  • My PR title follows the conventional commit format: <type>(<scope>): <description>
  • I have run npx nx format to ensure consistent code formatting
  • I have added tests for new functionality (if applicable)
  • I have updated documentation (if applicable)

@filipecabaco filipecabaco requested review from a team as code owners April 8, 2026 14:15
@github-actions github-actions Bot added the realtime-js Related to the realtime-js library. label Apr 8, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 8, 2026

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2236

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2236

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2236

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2236

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2236

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2236

commit: 4e6fa66

@filipecabaco filipecabaco force-pushed the fix/realtime-throttle-subscriptions branch from 8bfa170 to 4e6fa66 Compare April 8, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

realtime-js Related to the realtime-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant