Skip to content
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

WIP async session cache #2246

Closed
wants to merge 6 commits into from
Closed

Conversation

dbfreem
Copy link
Contributor

@dbfreem dbfreem commented Dec 11, 2021

What was wrong?

When I was researching the timeouts in the benchmark test I noticed the session is not cached in the request.py for Async aiohttp request. Mainly when I read this issue on the geth repo about multiple http sessions I realized this might be an issue.

Also, the aiohttp library recommends reusing sessions

I feel like as a follow up to this PR the request.py should be broken apart into two classes. One for Async and one for standard HTTP. This would better organize the code and make it more testable.

For the test I started with what was in the test_precached_session and modified it for the async request.
I also started with the code that was used in request.py and HTTPProvider for the caching and modified it for async.

I did find an issue later on related to this in the web3.py issues list.
Related to Issue #2016

How was it fixed?

Todo:

@dbfreem dbfreem changed the title async session cache WIP async session cache Dec 11, 2021
@dbfreem
Copy link
Contributor Author

dbfreem commented Dec 11, 2021

Looks like py36 and py37 failed. Need to look at why.

@dbfreem dbfreem closed this Dec 11, 2021
@dbfreem dbfreem deleted the feature/async_session branch December 11, 2021 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant