Execution aborted with ethers.js WebSocketProvider

I use WebSocketProvider from ethers.js lib.

const provider = new ethers.providers.WebSocketProvider(
  "wss://speedy-nodes-nyc.moralis.io/somecode/bsc/mainnet/ws"
);

In my code I subscribe to events of one smartcontract, and after couple of events error is raised.

code: -32000,
response: '{"jsonrpc":"2.0","id":40,"error":{"code":-32000,"message":"execution aborted (timeout = 5s)"}}\n'

I saw this options somewhere, in case that it helps you:

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

Thank you for advise, I tried it, but it didnt solve the problem. Moreover I cant find such options in ethers.js or ws source code. May be there are any rate limits here with websocket?

You subscribe to new events or you try something historical? There are rate limits but I don’t think that you got to 3600 requests per minute limit.

I only subscribe on 2 events of the same smartcontract. And also have some method calls to the same contract.

Calls to the smart contract as in to read the state with call or to send transactions with send? If you only subscribe to events you still get that error?

I read contract state data. And the problem was when contract method call returned a large array of data. Now I changes some business logic and dont have this error. I almost sure it the reason was large amount of data returned from method call. It seems websocket hangs or overflows with them.