Websocket error

I m building js app with speedynodes bsc wss using to read pending transactions. It works and I get the txns but after 8-10 sec, websocket connections closes with error code 4290. It lets me reconnect after 25 - 30 secs. If I connect b4, it throws error code 1006. This does not happens using testnet. This issue occurs only while using mainnet.

you may be rate limited on mainnet, because there are more transactions on mainnet than on testnet

what are the error messages associated with those error codes?

Unexpected server response: 429.

that happens every time you try? to get that error after 8-10 seconds?

The code works and spits out pending transactions but after 10 sec, it stucks and after 5 sec, it throws code 4290 connection down error and when trying websocket connection, it throws “unepected server response 429” with 1006 error code

did you also add configuration to reconnect to the web socket?

Yes. I have , I have reconnect mechanism in my run func


after 10s
1st one gave connection close code 4290 then
2nd one gave error 1006…Unepected error

This happens everytime I run the code.

Forget about the 2nd one…why is my connection closing? and what do I need to do to not get “rate-limited” as you mentioned above?

I was referring to these types of options:

    const options = {
      // Enable auto reconnection
      reconnect: {
        auto: true,
        delay: 5000, // ms
        maxAttempts: 5,
        onTimeout: false
      }
    };

you can talk with Kresimir to get a paid plan with a bigger limit, but I don’t know yet if that is the problem, and we may not have plans to cover all the number of pending transactions that could come in a minute on BSC