-
-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I fix this error: “Temporary failure in name resolution” #436
Comments
It's hard to tell without the full stack trace. Most likely your system occasionally fails to resolve the hostname in |
Anyway it's clearly not a bug in websockets, as websockets relies on asyncio / Python / the operating system to establish connections. The answer is inevitably going to be "look at a lower level". |
I have a similar problem. Here is my trace.
After that I get always the last error (socket.gaierror). I use |
I believe the root cause is visible in this stack trace:
|
Indeed. I think it is because the client (who uses a LTE-Connection) lost internet connection. After that trace we get always socket.gaierror. The client cannot resolve DNS.
There is no reference to my script. How could I handle that? |
If your script calls |
I received this error while connecting to a websocket (in python). The error handler automatically resets the connection, and the stream restarts. But the connections eventually break again every few hours.
What does the error mean? Why does the connection work, and then suddenly break after a few hours?
How do I fix this error? Is it some type of lookup issue? Wouldn't those result be cached?
Googling around, I saw this: "you probably should run a caching DNS forwarder locally, that'll shave off some milliseconds off your requests." Could you someone please explain what that means and just point me in the right direction.
Thanks!
My connection code is below. Is there anyway to cache the DNS here? Why would there need to be a lookup if it's a websocket connection?
The text was updated successfully, but these errors were encountered: