Closed bingoabs closed 5 years ago
It is cowboy the one likely closing it, so the error report should happen there. Although it is worth noting that browsers and http clients will likely close connections much earlier than that if nothing is sent. --
José Valim www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D
Closing this as mentioned, thanks for the report!
@josevalim I am sorry. And thanks a lot for your reply
No worries, it was no problem at all!
Hi, I came cross a issue that the
Phoenix Application
will close the connection after about 60s.I have a
nginx server
before theApplication
, I found thenginx error log
showupstream prematurely closed connection while reading response header from upstream
.Check the
Application log
, I found theApplication
just close the request without any log! I think someone can find the behavior just use:timer.sleep(70_000)
in any handler.I think the endpoint is responsible for this. So I check the endpoint and find the
:http - the configuration for the HTTP server. Currently uses Cowboy and accepts all options as defined by Plug.Cowboy. Defaults to false
. I found I should config thecowboy
, the cowboy server has some params, I think theidle_timeout
or 'inactivity_timeout` is more important for this issue.So I config the
http: [protocol_options: [idle_timeout: 300_000, inactivity_timeout: 300_000]],
and solve this problem.My question is why the server not emit the error message ? I think it is hard to add the missing config if we do not have any obviously information.