我使用的版本是binance-futures-connector-python v4.0.0rc2 Release
运行一段时间,有时候是一两天,有时候不到一天, 会出现报错(E Lost websocket connection)。
帮忙看看是不是版本不匹配之类的问题。
调用栈信息
2023-10-27 02:20:00 symbol: Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/home/ubuntu/.local/lib/python3.8/site-packages/binance/websocket/binance_socket_manager.py", line 47, in run
self.read_data()
File "/home/ubuntu/.local/lib/python3.8/site-packages/binance/websocket/binance_socket_manager.py", line 66, in read_data
raise e
File "/home/ubuntu/.local/lib/python3.8/site-packages/binance/websocket/binance_socket_manager.py", line 60, in read_data
op_code, frame = self.ws.recv_data_frame(True)
File "/home/ubuntu/.local/lib/python3.8/site-packages/websocket/_core.py", line 406, in recv_data_frame
frame = self.recv_frame()
File "/home/ubuntu/.local/lib/python3.8/site-packages/websocket/_core.py", line 445, in recv_frame
return self.frame_buffer.recv_frame()
File "/home/ubuntu/.local/lib/python3.8/site-packages/websocket/_abnf.py", line 352, in recv_frame
payload = self.recv_strict(length)
File "/home/ubuntu/.local/lib/python3.8/site-packages/websocket/_abnf.py", line 373, in recv_strict
bytes_ = self.recv(min(16384, shortage))
File "/home/ubuntu/.local/lib/python3.8/site-packages/websocket/_core.py", line 529, in _recv
return recv(self.sock, bufsize)
File "/home/ubuntu/.local/lib/python3.8/site-packages/websocket/_socket.py", line 122, in recv
raise WebSocketConnectionClosedException(
websocket._exceptions.WebSocketConnectionClosedException: Connection to remote host was lost.
之前是没有这个问题,一直运行的都挺稳定。最近一段时间才出问题