-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
HTTPProvider timeout is not working for chunked responses #3418
Comments
You should be able to pass in |
@kclowes Even if I pass |
(I don't have permissions to reopen the issue) |
Ah, interesting. I'll take a deeper look. Thanks! |
I feel maybe #1368 can be implemented also when fixing this, as the timeout can be used in this case. Let me see if I can get some time to draft a PR, at least a PoC of my idea |
- Related to ethereum#3418
* Allow timeout for chunked responses - Related to #3418 * Only read iter_content if stream is True * Add newsfragment --------- Co-authored-by: kclowes <kclowes@users.noreply.github.com>
Closed via #3428 |
Thank you very much for taking the time for this, this will help us a lot |
What happened?
This is a problem with urllib3 and not with web3.py. If server answers with a chunked response, timeout will not be respected. More info:
Code that produced the error
Full error output
Fill this section in if you know how this could or should be fixed
Using
requests.post(url, json=data, stream=True)
would allow Web3.py to control for how long the request is stuck, and process the chunked data in a more optimal way. Also, if the data is not chunked it shouldn't be an issue at all.web3 Version
6.19.0
Python Version
3.12.4
Operating System
linux
Output from
pip freeze
The text was updated successfully, but these errors were encountered: