Skip to content
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

ERROR:root:join push timeout for channel realtime #946

Open
2 tasks done
blockfer-rp opened this issue Sep 30, 2024 · 0 comments
Open
2 tasks done

ERROR:root:join push timeout for channel realtime #946

blockfer-rp opened this issue Sep 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@blockfer-rp
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

The Supabase real-time client is experiencing frequent disconnections and reconnection attempts. The client fails to maintain a stable connection, with repeated join push timeouts and keepalive ping timeouts.

To Reproduce

Steps to reproduce the behavior:

  1. Set up a Supabase project with real-time enabled
  2. Create a Python script using the following code:
import asyncio
import logging
from supabase._async.client import AsyncClient as Client, create_client

logging.basicConfig(level=logging.DEBUG)

supabase_url = "https://dmwfqahwcgkglvwyzhiy.supabase.co"
supabase_key = "your_supabase_key_here"

def handle_changes(payload):
    logging.info(f"Change received: {payload}")

async def test_realtime():
    supabase: Client = await create_client(supabase_url, supabase_key)
    
    try:
        await supabase.realtime.connect()
        logging.info("Connected to Supabase realtime")

        channel = supabase.channel('trade-tokens-updates')
        channel = channel.on_postgres_changes(
            event="INSERT",
            schema="public",
            table="trade_tokens",
            callback=handle_changes
        )
        
        await channel.subscribe()
        logging.info("Subscribed to channel")
        
        await asyncio.sleep(300)  # Wait for 5 minutes
    except Exception as e:
        logging.error(f"An error occurred: {e}")
    finally:
        if 'channel' in locals() and channel:
            await channel.unsubscribe()
        await supabase.realtime.disconnect()

if __name__ == "__main__":
    asyncio.run(test_realtime())

Expected behavior

The client should maintain a stable connection to the Supabase real-time service, successfully subscribing to the channel and staying connected without frequent timeouts or disconnections.

System information

supabase: 2.8.0
realtime: 2.0.5

@blockfer-rp blockfer-rp added the bug Something isn't working label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant