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

New default timeout of 60s in Cowboy 2 #3190

Closed
samphilipd opened this issue Nov 29, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@samphilipd
Copy link

commented Nov 29, 2018

We just upgraded to Cowboy 2 and noticed that some long running requests are cut off at 60s. Reading the Cowboy docs shows up this page: https://github.com/ninenines/cowboy/blob/6cc3b0ccca6c06592c2a1881cae39945de805747/doc/src/manual/cowboy_http.asciidoc

The key option seems to be idle_timeout - any idea how to change this when running Phoenix 1.4 on Cowboy 2.0?

I'm not entirely convinced it's the job of the webserver to be arbitrarily cutting off requests at all, but that's another question.

@petermm

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2018

You should be able to config it on your endpoint (though I haven't tested on 1.4)

config :hello, HelloWeb.Endpoint,
  http: [ port: 4000, 
             protocol_options: [idle_timeout: 5_000_000] 
        ],...

try if you can set it as :infinity as well..

maybe all these protocol options (and their defaults) should be added to the docs somewhere..

@josevalim

This comment has been minimized.

Copy link
Member

commented Dec 4, 2018

Those are documented here: https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html

I will add a link to the docs. :)

@josevalim josevalim closed this Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.