Closed nhmartens closed 1 year ago
The solution to avoid this problem was to make create_stream() a blocking function, because it must stay alive (the thread) till the new stream (and thread) is ready. this is not cool if you manage a lot of streams. so we added the parameter high_performance
to bypass this mechanism.
Are you using high_performance
in your ubwa instance?
Thank you for the quick reply.
I am not setting the high_performance
parameter in my code. According to the documentation, the default is False
so it should be a blocking function.
Can you test please adding this code to the end of your script:
while True:
time.sleep(1)
It would help to get a script that is producing this error on your system.
Okay, I am going to test this as well as the effect of using python 3.8. Also, I will try to replicate the error with a script that I can share. As the error usually only occurs after a couple of days, it might take a while until I can come back to you.
The script attached reproduces the error on my system. It took about 3–4 days until it stopped with the same error message as mentioned above. Running it in python 3.8 did not resolve the issue and also adding your proposed while loop at the end did not help.
@oliver-zehentleitner I have provided the log in the thread on issue #299 is there any update on the issue? I still run into it very regularly.
Version of this library.
1.41.0
Solution to Issue cannot be found in the documentation or other Issues and also occurs in the latest version of this library.
Hardware?
Local server/workstation
Operating System?
macOS
Python version?
Python3.10
Installed packages
No response
Logging output
Processing method?
process_stream_data
Used endpoint?
binance.com
Issue
First of all, thank you for sharing this very useful library! Unfortunately, when using the "userData" stream, the connection seems to disconnect regularly after a couple of days with the message: "RuntimeError
error: 11
- error_msg: cannot schedule new futures after interpreter shutdown". I only experience the issue with the "userData" stream. When using the "aggTrade" stream, everything seems to be fine.I saw that similar issues were posted already where python >= 3.9 could have been the problem, so I will test running the program with 3.8 to check if the issue still occurs.