1
votes

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).

1
You can read this article -> poeticoding.com/…, it seems to be exactly about the issue that you have. I noticed that protocol_options goes inside the http key, maybe that's why it didn't work. - NoDisplayName
Thank you, that was it! If you post this as an answer I'll accept it. - Jakub Markos

1 Answers

3
votes

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