ruby on rails - how to deal with timeout in ROR project -
i working project ruby on rails. there's 1 page list of items can choose multiple of them , change information @ time. when data huge , choose many items in process @ time. run few minutes long, page show error message , caused server timeout...how can let run ten minutes not timeout , return error message?
there not 1 way this.
firstly, can in log check long sql queries, if see long ones, can try , optimize them.
you can use gems rails-footnotes see sql queries in bottom of each page in dev environment.
if doing expensive tasks, try process them in background tools such resque or delayed_jobs.
Comments
Post a Comment