-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto reconnect loses subscription to postgres_changes
events
#213
Comments
I have the same issue, and it appears a lot of people are. Can the devs please provide an answer or workaround for this? The library unfortunately is not usable because of this disconnection. |
Here is pseudocode of the workaround I am using successfully.
If too many exceptions occur (e.g., due to connection loss), additional mechanisms are executed after the loop to handle the situation. |
How does setting auto_reconnect to false fix your issue, out of curiosity? |
With |
Bug report
Describe the bug
The
auto_reconnect
feature, which was fixed in PR #203, is not functioning as expected. When the connection to the realtime server is lost and reconnected usingauto_reconnect = true
, the client successfully rejoins the channel but does not resubscribe to thepostgres_changes
events.To Reproduce
An extracted version of the code setup:
Expected behavior
After the connection is automatically reestablished, all postgres_changes events should be resubscribed.
Log
2024-09-30T13:08:13.712427114Z
nopostgres_changes
are sent to the realtime server. On the first connect at2024-09-30T13:05:21.388617410Z
they have been sent.INFO: Channel phoenix not found
message appears repeatedly (is this related to the heartbeat?). It becomes a bit overwhelming as it floods the logs. I'm connecting to a Supabase cloud instance. Is there any configuration I need to set up to ensure this channel exists?System information
The text was updated successfully, but these errors were encountered: