I'm having working on a Rails application that is supposed to run on an Nginx server. Depending on the input, the application may take very long to process the requests (or hang up in case of bugs), so I want to prevent processes from running forever. Apart from the Nginx configuration, which ensures that the client gets a timeout signal, I think I still may have to make sure that my app stops working on those requests. Where should this be handled? Within my Rails app (using Timeout/Thread from std-lib) or externally (killing processes)?
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Eager-loading association count with Arel (Rails 3
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
I usually do this at the Rack layer using Rack::Timeout.