WebSocket provider unreliable

We are trying to use the WebSocket provider in our Node.js dApp to have a log stream filtered by our events, but it is working very unreliably. At times, this will print on the production console:
connection not open on send()

We were using the latest web3-1.0.0-beta36 and then downgraded to -beta33 as per the docs, but the behaviour persisted.

And any query that uses WSS provider (like using a contracts methods) will fail because the underlying transport (websocket) failed.

We can’t use any other transport to get events, so we are kind of stuck. What can we do?

Check our docs here, https://infura.io/docs/ethereum/wss/faq, the section on “Why does my wss connection disco” could help.

Let us know if any of this helps.

No luck. Most of the times the connection is not setup correctly (not dropped after idling). We are resorting to hosting our own Parity node, which is working as intended.

Can you provide more information about the exact methods you’re trying, potentially a code snippet of the code you’re using to access wss, and the full responses you are getting on disconnect or error?