Closed eliquinox closed 6 years ago
I have a fix for this but it depends on a fix in the websockets library. Still waiting on them to release a new version.
@eliquinox can you tell me what version you were running? Was it installed from pypi? I pushed some changes last week to the repo, but didnt release a new version yet. Do you know if you had the latest set of changes?
I do see the point you are making though, its not an exception from the websockets library, so I should add another except handler for this.
I think my latest commit should address this. Hard to test for since the connections can take a long time to error out. I've updated my servers, let me know if you encounter any errors on your side. If I dont hear anything within a week or so I'll close this out (Unless I hit an error).
I tried it with your latest commit in feedhandler.py and got the above output in the logger.
Perhaps you can use the same recovery logic to handle ConncetionResetError
as you do to recover from ConnectionClosed
. When is the websockets library scheduled to push the new version?
I made some commits after I asked that question (and I even pushed a new version to pypi). Did you upgrade to that version before testing again? The latest version does have checks for connectionResetError
@bmoscon could you give a link to the specific branch / version you are referring to? I will make sure to run tests again when I upgrade. Cheers.
https://pypi.org/project/cryptofeed/0.10.1/
so you can pip install it (or upgrade)
Its on master, commit: 359aee907c37e0c1517a7563dd930e6a480e3834
so you could just make sure you're on master and do a git pull (if you're running from source)
@eliquinox were you able to confirm you're using the correct version and start a test? I've been running the latest vs bitmex for ~3 days now without issue. I'll leave it going for at least another week or so, but hoping someone else can help me confirm its working, and hopefully one of us will encounter an error that causes a reconnect
been running for 3+ days now - I hit an error and it successfully reconnected:
2018-05-14 10:13:03,065 : WARNING : Feed BITMEX encountered connection issue WebSocket connection is closed: code = 1006 (connection closed abnormally [internal]), no reason - reconnecting...
Going to close this as I no longer have seen any of these errors. If you have issues still please re-open @eliquinox !
16 handled the ConnectionClosed exceptions, however streaming and writing Bitmex data has caused the following error after one and half days of keeping connection alive. Some sources say that there is not much that can be done about this error: https://stackoverflow.com/questions/20568216/python-handling-socket-error-errno-104-connection-reset-by-peer?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
Was wondering if there is another try-catch block that can be defined in feedhandler.py to handle this.