SupabaseS
Supabase6mo ago
Shoast

Realtime channel closes over and over again

Hey there, I'm hosting Supabase on DigitalOcean, mostly for the Realtime functionality. I have an app called valoplant in which users now can also see each others pointers.

I implemented the feature - every 70ms the users sends a small message to the server with the new cursor location etc. It works well, but sometimes, very randomly, the channel closes itself with a message "too many messages". However, there are only like 15 messages per second at max being sent and received. That really baffles me and I have no idea how to fix this issue.

I even implemented reconnect logic, so that the channel gets unsubscribe and recreated, but that also results in a weird loop in which the status constanly switches beween closed and subscribed. Has anyone encountered this issue and knows a fix?
Was this page helpful?