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
max_connections is not respected and connections pool grows until connections are closed by idle timeout #648
Comments
Does the requests return to the pool? What dis the Response thing returned ? Does it contains the body? |
@benoitc the code repro above is literally runnable (example.com and .net are real existing domains). Both requests return 200. |
I'm running into this problem as well - any updates on where things are on this? |
There will be a release this WE including a fix for it.
…On Thu, Oct 22, 2020 at 6:37 PM Joe Pettit ***@***.***> wrote:
I'm running into this problem as well - any updates on where things are on
this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#648 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADRITYT4U5KT5O35SUGFLSMBNVDANCNFSM4P76ENZA>
.
|
I was bit pretty severely by this bug a couple days ago. Had to disable pooling entirely. Is there a release coming coming out that contains the fix? |
What happened. How did you reproduce the issue? There is a relase that will land today that is changing the way connections are handled, but the problem above shouldn't trigger anything severe if connections are released correctly to the pool. |
Is reading the body required? I don't see that mentioned in any of the documentation. 🤔 |
Yes to release the socket you need either read the body (which is always done when using the |
that should indeed be mentionned by the doc ... |
Oh, ok. We may have some locations where we are not reading the body. Would you be able to point me to the right location in the documentation that says that? |
that's not written explicitly in the doc i think. A connection is removed from the pool automatically if the process is closed before releasing it or if the whole body has been read, otherwise (logically I would say) there is no way to know if the connection has to be released. |
https://github.com/benoitc/hackney/blob/master/NEWS.md 1.17.0
Is this fixed now? We downgraded hackney to 1.15.2 and wondering if it's safe to upgrade again: https://git.pleroma.social/pleroma/pleroma/-/issues/2101 |
watch the release this week-end. Hackney will be bumped to 2.0. This will
be announced next week also :)
…On Fri, Apr 30, 2021 at 6:33 PM Alex Gleason ***@***.***> wrote:
https://github.com/benoitc/hackney/blob/master/NEWS.md
1.17.0
fix memory leak in connection pool
Is this fixed now?
We downgraded hackney to 1.15.2 and wondering if it's safe to upgrade
again: https://git.pleroma.social/pleroma/pleroma/-/issues/2101
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#648 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADRIXTRL52IVNG756HNIDTLLLW7ANCNFSM4P76ENZA>
.
|
Hello @benoitc! I'm facing with it on |
@kuznetskikh does httpoison read the body? Body need to be read or skipped to release the connection. |
Hello @benoitc. I'm sorry for late response, it's working fine for me now.
And only 1 connection is available. Thank you! |
Versions:
Hackney:
1.16.0
HttPoison:
1.7.0
Elixir/Erlang:
Simplest Repro:
Set max pool size to 1 and hit 2 different servers.
free_countis
is2
, but it should not be greater thanmax
, which is1
.Suspected bug location
I suspect the bug was introduced in this checkin: ec5b90c
Note how the check
if PoolSize =< MaxConn
was not carried over fromhandle_call({checkin,...
intodeliver_socket
function for theempty
case.The new check
dict:size(Clients) >= MaxConn
inhandle_call({checkout...
ensures that no more thanMaxConn
clients will be waiting for connection at the same time, but is not sufficient to limit the total pool size.The text was updated successfully, but these errors were encountered: