How do I handle long requests for a Rails App so other users are not delayed too much?

后端 未结 3 971
醉梦人生
醉梦人生 2021-01-26 02:43

I have a Rails app on a free tier on Heroku and it recently started getting some users. One of the events in my app involves querying another API and can take up to 10 seconds t

3条回答
  •  借酒劲吻你
    2021-01-26 03:10

    What kind of app server are you using? If you are using passenger or unicorn, you can have multiple worker processes that can handle simultaneous requests

    http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxinstancesperapp_lt_integer_gt

提交回复
热议问题