You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After sleep 5 seconds as defined in httpx.dispatch.connection_pool.ConnectionPool.KEEP_ALIVE_EXPIRY, I run this commend line: lsof -np 18532 | grep 8080
Then I get this:
A mitigation would be to just use a single client wherever possible, or a single client per required configuration. If you do that then you're getting the benefits of the connection pooling that it provides.
However there is a valid issue here, related to how we deal with closing multiple mounted dispatch classes, rather than just the main dispatch class.
Actually, I am writing a web crawler, after runing 1-2 days it crashes because of "too many open files", this is how I get it.
I have no time to wait httpx to release a new version, sorry, I've got to use aiohttp to avoid this problem.
Activity
lovelydinosaur commentedon Feb 25, 2020
Good observation... We're closing the main dispatch class, but we're not also making sure to close the proxy dispatch classes...
httpx/httpx/_client.py
Line 864 in 50d337e
A mitigation would be to just use a single client wherever possible, or a single client per required configuration. If you do that then you're getting the benefits of the connection pooling that it provides.
However there is a valid issue here, related to how we deal with closing multiple mounted dispatch classes, rather than just the main dispatch class.
Jonney commentedon Feb 25, 2020
Actually, I am writing a web crawler, after runing 1-2 days it crashes because of "too many open files", this is how I get it.
I have no time to wait httpx to release a new version, sorry, I've got to use aiohttp to avoid this problem.