#Is there a way to control the websocket reconnect backoff?

3 messages · Page 1 of 1 (latest)

stray root
#

Basically I want to cap the reconnect time to 10seconds. I was just doing some local testing and very quickly went over 20 seconds:

Attempting reconnect in 22248.468971814553ms

Any help greatly appreciated.

crimson muralBOT
#

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

#

The Convex system uses an exponential backoff strategy for retrying actions, including WebSocket reconnections. This strategy involves waiting longer after each retry attempt, which is useful when you don't know exactly how long to wait but also don't want to retry thousands of times in a tight loop.

However, based on the provided knowledge sources, there doesn't seem to be a way to directly control or cap the WebSocket reconnect backoff time in Convex. The convex-action-retrier library allows configuring the specific parameters of the exponential backoff, but it's not clear if this applies to WebSocket reconnections.

For more detailed information or assistance, I would recommend reaching out to the Convex support or community forums.

Source (https://stack.convex.dev/retry-actions#back-off)

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