Overview
Hi, we are using the Drift Protocol SDK (2.148.0), which underneath uses solana-web3.js (1.98.4) RpcWebSocketClient.
In production, the websocket connection is currently very unstable and that causes a storm of console.error messages on our instance.
Actually, this reaches the log rate limit of our provider
Railway rate limit of 500 logs/sec reached for replica, update your application to reduce the logging rate. Messages dropped: 13482
Railway rate limit of 500 logs/sec reached for replica, update your application to reduce the logging rate. Messages dropped: 11050
The same error is logged in an infinite loop before crashing our Railway instance.
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
I have noticed that it is caused by an infinite loop here
|
if (!isCurrentConnectionStillActive()) { |
In my case, the call to accountUnsubscribe fails because the connection isn't open, but isCurrentConnectionStillActive() still says that the connection is alive, then recursively loop !!
Steps to reproduce
Difficult to say ...
Description of bug
Ask me anything I can do to provide more insights
Overview
Hi, we are using the Drift Protocol SDK (2.148.0), which underneath uses solana-web3.js (1.98.4) RpcWebSocketClient.
In production, the websocket connection is currently very unstable and that causes a storm of console.error messages on our instance.
Actually, this reaches the log rate limit of our provider
The same error is logged in an infinite loop before crashing our Railway instance.
I have noticed that it is caused by an infinite loop here
solana-web3.js/src/connection.ts
Line 6323 in c26c13b
In my case, the call to accountUnsubscribe fails because the connection isn't open, but isCurrentConnectionStillActive() still says that the connection is alive, then recursively loop !!
Steps to reproduce
Difficult to say ...
Description of bug
Ask me anything I can do to provide more insights