-
-
Notifications
You must be signed in to change notification settings - Fork 854
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
Errors on HTTP/2 should be propagated across all streams. #1239
Comments
Okay, so the next thing to do would be to try to narrow this down a bit...
|
Thank you, @tomchristie I modified my program and now each worker has 4 requests: 1.using httpx, http2=True, with proxy. I start up 7 workers like such above. And later I will check if they hang at the same position. |
After 24 hours of running, 2 workers hang at the first request(1.using httpx, http2=True, with proxy.). While others are still working. btw, for each request I use a while loop for a retry mechanism, when the request fails it will try to request with the same session, is that a problem? while tmp <= 10:
try:
tmp += 1
print('requesting', url_base)
response = session.post(url_base, files={'imgfile': open(tmp_path, 'rb')}, headers=headers,
timeout=Timeout(5.0))
print('tmp0 = ', tmp)
break
except Exception as e:
print(e) and the log shows one of the hanging worker stuck at the 3rd try, and the other stuck at the 10th try.
|
Just to confirm - you're only ever seeing this error when using a proxy and using |
sorry for the late reply, and yes. |
Okay, although we're not currently able to reproduce this, I do have a good idea of a likely candidate for the cause here. Currently where an exception occurs on the HTTP/2 connection we're only raising that against the stream on which it occurs. So for example, if a server disconnect occurs, then one stream will see that exception, but it won't be raised on other streams that are being concurrently handled on the same connection. |
Thank you @tomchristie and for now there is nothing I can do ? |
Resolved via encode/httpcore#440 |
I'm using httpx in my project for http/2 requests, and my program sometimes get stuck at this line after working for a while(usually in 1 or 2 hour this will happen):
note that the timeout doesn't work and it just hang there for forever.
how can I debug this?
some demo code here:
basically my program is POSTing a pic to this url, and get response back via http2. and it works good at first and get stuck after a while with the console prints "requesting https://s.taobao.com/image" at the end, without raising any error.
The text was updated successfully, but these errors were encountered: