Realtime listener instability

Hi guys! Long time I complained about the Supabase realtime listeners disconnecting, without having any clue of what is happening. After putting in place a retry mechanism, I can see it actually happens A LOT Am I the only suffering from this ? I am using a realtime listener on the server side fyi In the screenshot, an small extract of logs (with some logs filtered out to make readibility better) and here is my code with retry strategy If I'm not the only one suffering from this : are you aware if there is any fix planned ? If I'm the only one : wtf is am I doing wrong - because the service itself is not restarting nor losing network connection (runs 24/7 on ECS Fargate in AWS, and I still receive other webhooks events from other platforms)
No description
4 Replies
Ninjeneer
NinjeneerOP3mo ago
Here is my listener + retry strategy
Ninjeneer
NinjeneerOP3mo ago
(worth mentionning : it works pefectly using local dev Supabase, no disconnection - it only happens with official hosted Supabase)
garyaustin
garyaustin3mo ago
I would file an issue with your details in supabase/realtime github and see if the realtime team responds. Not many users doing this from a server. On browsers and devices there are many reasons for disconnection. You might also consider doing your own notify/listen setup as you are on a server. Then you use postgres notify in a trigger function to send a message to your server using a postgres client library with listen. It does limit you to a smaller amount of data though for each message.

Did you find this page helpful?