elixirphoenix-frameworkcowboy

Request restarted after 60 seconds


After upgrading to phoenix 1.4.10 (from 1.3.0), I have problems with long running requests (it takes around 2 minutes to generate a file to return). It seems that after 60 seconds the controller action handling the request is killed and is started again. I the logs I see

[info] GET /admin/download_file/2
... running for 60 seconds, and then again without any browser action
[info] GET /admin/download_file/2

This continues until the cowboys idle_timeout is hit (which I've increased to 4 minutes):

config :myapp, MyApp.Endpoint,
  protocol_options: [
    idle_timeout: 240_000
  ]

Is there some other configuration timeout that I'm missing, or is there some way to turn on more detailed logging (I have

config :logger, :console,
  level: :debug,

but it doesn't write anything about what is cowboy/phoenix doing under the hood).


Solution

  • Everything seems to be correct, but it doesn't work because protocol_options config should go inside the http key.