Closed 9mm closed 5 years ago
One is from gun_error
and the other from gun_down
I suppose?
I'm not sure, is there a difference?
First one is a request error, second one process is down, recipient of those messages might not be the same process.
Hey, sorry I'm not too familiar with Gun or erlang. What would cause something like that in the case of the 2nd one? How can I fix that?
i'm basically making a huge amount of requests per second, and I'm logging every failure type so I can better tweak/tune each connection (timeouts, pool timeouts, # of connections, etc). I notice I have these two errors and I'm not sure if it's 2 separate problems or the same one (in which case if its just one problem, then a closed connection is just the remote server), but if the 2nd one is a different problem that I can fix than I would like to
Same error, different context (request and connection).
Looking at the code I see that when socket closes there is:
Protocol:close(ProtoState),
Transport:close(Socket),
down(State, closed);
Protocol:close
in cases when stream is alive will produce gun_error
with {closed, _}
. Otherwise down
will produce gun_down
with closed
.
Not sure what alive stream means in the context of HTTP/1. It seem that HTTP/2 does not have this check and always produces gun_error
.
Bottom line I think they mean same thing: server closed connection without responding to the request.
Awesome thanks for that translation, I really appreciate it, and thank you essen for your help!
Cheers.
Hey, so far I'm handling all the different errors for fine-grained tuning.
I notice that I have some logs showing up under this (
machine_gun
proxying errors in Elixir below, not erlang). He told me I should ask here because these failure reasons come fromgun
But I have others showing up as this:
I'm not quite sure what the difference is?
Thanks!