Critical Exception : Seg Fault when code 1006 (connection closed)
See original GitHub issueHello 😃
It’s been the second time i’m getting this type of error. Using python 3.7, linux mint 18.3 :
It’s very hard for me to share reproductible code as it happened after several hours of connexion. But if you want to know, the script used is exactly the same as in #39
First time (yesterday) was I think after a wifi bug in my place
Today it happened more or less around when Binance opened trading again after maintenance.
Both happened after several hours of connexion with 2-3 assets with kline 1m
CRITICAL:root:BinanceWebSocketApiSocket->start_socket(f7d276df-b38e-4866-b22d-95e4a5e52ced, ['kline_1m'], ['btcusdt', 'ethusdt', 'ethbtc'])
Exception ConnectionClosed Info: WebSocket connection is closed: code = 1006 (connection closed abnormally [internal]), no reason
CRITICAL:root:BinanceWebSocketApiManager->stream_is_crashing(f7d276df-b38e-4866-b22d-95e4a5e52ced)
Segmentation fault (core dumped)
Is it a bad behaviour when Binance is reporting error 1006 (https://github.com/binance-exchange/binance-official-api-docs/blob/master/errors.md#-1006-unexpected_resp) or a problem on “my” side ? Any ideas about how to tackle and investigate this problem ? What can I do to share you more infos about what happened if it happens again ?
Thank you ❤️
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Hello! 😃
I think we get this error, even if we do nothing, only receiving data. I think our pings are correct. From time to time we have to expect to get disconnected for any reason (e.g. 24 h connection reset) so we have to life with that and handle it right -> reconnect. Important is, that you will miss data which was broadcast from binance during your connection loss. My strategy is to have 2 collectors on two different machines so i receive everything two times. An other idea is a scheduled replace of the streams (https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/15). I think there are several ways to solve this problem.
If you want to investigate the reported error you can set logging to DEBUG and see whats happening before this error occurs.
Best regards, Oliver
My tests are positive, if you still have problems create a new issue or reopen this one! Best regards!