Daljeet Virdi
Daljeet Virdi3w ago

Websocket reconnecting.

I'm getting a lot of websocket reocnnection issues. Could you please help? If I do this:
const convex = useMemo(() =>
new ConvexHttpClient(process.env.NEXT_PUBLIC_CONVEX_URL!),
[]
);
const convex = useMemo(() =>
new ConvexHttpClient(process.env.NEXT_PUBLIC_CONVEX_URL!),
[]
);
instead of const convex = useConvex() Things go a bit faster, but still get a lot of reconnection issues like:
2025-05-03T15:46:00.842Z begin ws.onclose
logging.js:78 WebSocket closed with code 1013: InternalServerError
logging.js:78 Attempting reconnect in 51.371233042534726ms
logging.js:75 2025-05-03T15:46:00.894Z constructed WebSocket
2025-05-03T15:46:00.842Z begin ws.onclose
logging.js:78 WebSocket closed with code 1013: InternalServerError
logging.js:78 Attempting reconnect in 51.371233042534726ms
logging.js:75 2025-05-03T15:46:00.894Z constructed WebSocket
1 Reply
Daljeet Virdi
Daljeet VirdiOP3w ago
connectionCount: 25
lastCloseReason: "InternalServerError"
maxObservedTimestamp: "hZveQnMQPBg="
sessionId: "fb1bf9a7-5653-42fb-a706-cca23485376c"
type: "Connect"
connectionCount: 25
lastCloseReason: "InternalServerError"
maxObservedTimestamp: "hZveQnMQPBg="
sessionId: "fb1bf9a7-5653-42fb-a706-cca23485376c"
type: "Connect"
wss://rapid-jay-22.convex.cloud/api/1.24.0/sync`

Did you find this page helpful?