Realtime (self-hosted) config: where to set disconnectOnNoSubscriptions = false? #30187
Unanswered
sinameraji
asked this question in
Questions
Replies: 1 comment 2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm using supabase realtime (i'm self hosting supabase) in my next js app. i have a use case where i wanna maintain 1 websocket connection that joins and leaves different channels, making sure 1 channel is active at a time, without disconnecting the websocket connection as it does these phx joins and leaves.
the problem i'm facing is that when i leave a channel, it currently disconnects websocket, and creates a new connection and then joins the new channel. i noticed a hint in supabase realtime docs for Swift that this might be caused by disconnectOnNoSubscriptions being set to true in realtime config. It seems to me that this creates a higher CPU usage than if i had 1 connection per supabase client, which then joined and left different channels.
how/where can i set disconnectOnNoSubscriptions to false? do i add it to my supabase docker compose yml file? if yes, will i just add it as an env variables? with the same spelling?
if i'm on the wrong track, i appreciate a heads up too. thank you
Beta Was this translation helpful? Give feedback.
All reactions