i have 200 symbols each one have one socket and after a while it stops working and gives me the following error message “sent 1011 (unexpected error) keepalive ping timeout; no close frame received”
Are you using the combined strams feature? If not, subscribing to 200 symbols simultaneously, it’s possible that the sheer volume of data or the number of connections is causing some strain.
To use the combined strams feature :
Also, the error suggests a problem with keepalive pings. WebSockets often have a ping/pong mechanism to keep the connection alive. You can consider setting the ping_interval and ping_timeout parameters in websockets.connect() to manage the keepalive pings: