Losing connection to websockets after a while and they don't seem to work after manual restart


I have been experimenting with the ERC20 websockets. They work fine in the beginning but I see that they are losing connection after some time that is less than an hour.

I have tried to deal with this by restarting them on a ‘close’ event and on a ‘end’ event but the WS doesn’t seem to pick up both

Later I tried to restart the connection after an hour, on every hour. The connection doesn’t seem to work after the manual restart.

Any other way I can get this to work out without losing connection?


Hi @AmirZenGo thanks for reaching out. We recommend trying pings in your websocket connection to help keep the connection open.

Are you receiving any error or information when the connection closes?