#Reconnecting websocket after inactivity

3 messages · Page 1 of 1 (latest)

coarse nebula
#

After how long of inactivity will the websocket be disconnected?
Is there any way to configure this?

sick ospreyBOT
#

Hi @coarse nebula. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the knowledge sources, I don't see specific information about exactly how long a period of inactivity will cause a Convex WebSocket to disconnect. The documentation indicates that Convex handles reconnection automatically, but doesn't specify the timeout period.

From the documentation, we know that:

If the internet connection drops, the client will handle reconnecting and re-establishing the Convex session automatically.
Convex React Documentation

Additionally, when using TanStack Query with Convex:

Subscriptions to Convex queries will remain active after the last component using useQuery for a given function unmounts for gcTime milliseconds. This value is 5 minutes by default; if this results in unwanted function activity use a smaller value.
Convex with TanStack Query

However, this is about query subscriptions rather than the WebSocket connection itself.

There's no clear information in the provided knowledge sources about configuring the WebSocket inactivity timeout. If you need more specific information about this, I'd recommend reaching out to Convex support directly at [email protected].

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: