How to increase Heroku 30s h12 timeout

前端 未结 2 1915
感动是毒
感动是毒 2021-01-01 02:33

I\'m running a rails app, which has a json webservice call from a local client developed in c++ (a post command with a multipart json form, uploading a streamed file)

<
相关标签:
2条回答
  • 2021-01-01 03:09

    I've ended using delayed job + workless, and now my worker dynos only run when they need to.

    As heroku has the free 750 hours free per app plan, when you have low usage, you might be able to keep using it for free.

    0 讨论(0)
  • 2021-01-01 03:10

    the suggestion is: use a background process!

    i read that you want to avoid it, but there is no way around it! it is a best practice in web-apps to return to the client as fast as possible, because it frees up resources. when you have just one dyno running at heroku and you have multiple requests, they will get blocked for your timeout and no user is able to access your page. you can easily have denial of service cases when you have such longrunning processes.

    in case you do not want to do background processes because of the cost, have a look at freemium: https://github.com/phoet/freemium

    0 讨论(0)
提交回复
热议问题