I have a simple app that displays various logs that are updated via several backend processes, and I’ve found that if the browser is left alone for some time (not sure how long), it seems the realtime heartbeat stops, and then I don’t get those realtime updates anymore.
Can someone confirm that is indeed why it works on a page refresh for XX minutes/seconds, and then stops getting realtime updates?
If so, is this timeout configurable on the WeWeb side and/or the Supabase side? I haven’t seen any mention other than a session timeout for auth, but no realtime settings…
If it’s not configurable, is there something I can do on the WeWeb site to fire on a regular basis to keep that heartbeat alive?
Awesome, thanks! I’m just having my users reload the page, but it would be ideal for the app to keep this alive, or at least restart it when it becomes active again
@imb , if they’re active on that browser window/tab, then the websocket should stay open. It’s after some span of inactivity that the websocket disconnects and the page needs a reset. If I knew how to access the websocket status, it might be possible to display a message like “You’ve been inactive for XX minutes - please refresh the page”
yeah websocket status would be really helpful - haven’t seen it in supabase metadata yet. Looks like the alternative solution would be to trigger a pop-up requesting the user to refresh the page after a specific period of time.
We’re having issue with this, alot of our users like to chat to customers etc while they’re using the app with realtime on causing realtime to unsubscribe and cause a host of issues. We’ve setup up some basic workarounds for this but nothing that we’re happy with. Is there any idea on if we’ll have some sort of fix for this, I don’t mind if it’s even something that we can just use to see if we’re still connected or something so then I can check periodically if the user is still connected.