httpx.ConnectTimeout
See original GitHub issueMost of the time, everything looks pretty good. But this httpx.ConnectTimeout
happens occasionally. I wonder if this has anything to do with my sender
setup though.
File "/usr/local/lib/python3.7/site-packages/tekore/_sender/client.py", line 78, in wrapper
response = self.send(request)
File "/usr/local/lib/python3.7/site-packages/tekore/_client/base.py", line 70, in send
return self.sender.send(request)
File "/usr/local/lib/python3.7/site-packages/tekore/_sender/extending.py", line 297, in send
fresh = self.sender.send(request)
File "/usr/local/lib/python3.7/site-packages/tekore/_sender/extending.py", line 86, in send
r = self.sender.send(request)
File "/usr/local/lib/python3.7/site-packages/tekore/_sender/concrete.py", line 41, in send
data=request.data,
File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 674, in request
request, auth=auth, allow_redirects=allow_redirects, timeout=timeout
File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 704, in send
request, auth=auth, timeout=timeout, allow_redirects=allow_redirects
File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 733, in _send_handling_redirects
request, auth=auth, timeout=timeout, history=history
File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 769, in _send_handling_auth
response = self._send_single_request(request, timeout)
File "/usr/local/lib/python3.7/site-packages/httpx/_client.py", line 803, in _send_single_request
timeout=timeout.as_dict(),
File "/usr/local/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.7/site-packages/httpx/_exceptions.py", line 359, in map_exceptions
raise mapped_exc(message, **kwargs) from exc # type: ignore
httpx.ConnectTimeout: The handshake operation timed out
For reference, here’s the sender that I’m using.
sender = tk.CachingSender(max_size=256, sender=tk.RetryingSender(retries=3))
app_token = cred.request_client_token()
spotify = tk.Spotify(token=app_token, sender=sender)
Anything suspicious?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Advanced Usage - HTTPX
The connect timeout specifies the maximum amount of time to wait until a socket connection to the requested host is established. If HTTPX...
Read more >How can I fix ConnectTimeout exceptions from within FastAPI
I seem to be running into an issue at higher concurrency where my client.post is causing a httpx.ConnectTimeout exception.
Read more >Connect Timeout confusion · Issue #832 · encode/httpx - GitHub
Hi! I'm quite confused about Connect Timeout. I observed that I have some applications that happens to throw a ConnectionTimeout exception ...
Read more >How to use the httpx.AsyncClient function in httpx - Snyk
To help you get started, we've selected a few httpx.AsyncClient examples ... _make_url(station, lat, lon) try: async with httpx. ... ConnectTimeout, httpx.
Read more >Python Examples of httpx.get - ProgramCreek.com
ConnectTimeout, httpx.ReadTimeout): raise TimeoutError(f"Timeout from {self.__class__.__name__} server") except gaierror: raise ConnectionError( f"Unable to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I faced this same issue and increasing the timeout seemed to fix the issue:
I did have to dig a while to find this Github issue and the resolution steps. I wonder if having it in the documentation or examples somewhere would make it more visible to newcomers.
cheers, timeout=60.0 solved similar issue that I faced with parsing hh.ru .