Chris Richards
2006-May-14 17:25 UTC
[Rails] Timeout in production mode after 2 min, but not in dev mode?!
One of my actions runs for more than 2 minutes. In development mode it runs and completes successfully, but in production mode it quits out with a timeout error: "Timeout::Error (execution expired):" Any ideas how i can stop this? I''m desperate to find a solution. Is there a setting i can change somewhere? Any help would be greately appreciated, Thanks Chris -- Posted via ruby-forum.com.
Jon Gretar Borgthorsson
2006-May-14 17:33 UTC
[Rails] Timeout in production mode after 2 min, but not in dev mode?!
Any info that comes in the production.log or the server logs? Also if this is on a posix based system. Then this could be because of rigths issue. I''ve had problems with the server hanging if the web server can''t write to the tmp directory or the log directory. On 5/14/06, Chris Richards <evilgeenius@gmail.com> wrote:> One of my actions runs for more than 2 minutes. In development mode it > runs and > completes successfully, but in production mode it quits out with a > timeout error: > > "Timeout::Error (execution expired):" > > Any ideas how i can stop this? I''m desperate to find a solution. > Is there a setting i can change somewhere? > > Any help would be greately appreciated, > > Thanks > Chris > > -- > Posted via ruby-forum.com. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson jongretar.net
Isak Hansen
2006-May-15 12:04 UTC
[Rails] Timeout in production mode after 2 min, but not in dev mode?!
On 5/14/06, Chris Richards <evilgeenius@gmail.com> wrote:> One of my actions runs for more than 2 minutes. In development mode it > runs and > completes successfully, but in production mode it quits out with a > timeout error: > > "Timeout::Error (execution expired):" > > Any ideas how i can stop this? I''m desperate to find a solution. > Is there a setting i can change somewhere? > > Any help would be greately appreciated, >Any sane production environment will (and should) terminate a task that doesn''t complete or produce any ouput in a reasonable amount of time. I suggest you process this task asynchronously instead. I.e. return a page saying "Job subitted, estimated time until completion: xxxx", and write an entry in the db that gets picked up by a cron job or something similar to perform the actual work.