question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Critical Exception : Seg Fault when code 1006 (connection closed)

See original GitHub issue

Hello 😃

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:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
oliver-zehentleitnercommented, Feb 19, 2020

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

0reactions
oliver-zehentleitnercommented, Feb 25, 2020

My tests are positive, if you still have problems create a new issue or reopen this one! Best regards!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Seg Fault when code 1006 (connection closed) · Issue #40 ...
You are right, if you turn off and on the wifi for a few seconds, the connection does not get closed and missing...
Read more >
Getting the reason why websockets closed with close code 1006
Close Code 1006 is a special code that means the connection was closed abnormally (locally) by the browser implementation. If your browser client...
Read more >
Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for ... Use a pass-through query to access the remote object...
Read more >
ABB Motion Drives Error trouble shooting manual
error code in case of a fatal error during boot up. The code is displayed on the seven-segment starting with a 'b'. Try...
Read more >
1006 connection closed code but stream never restarts
I use to receive this error alot and it went away but it happened again this morning: WARNING [stream.py:224] websocket error, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found