Forum: Ruby on Rails Max Execution Time with fastcgi (and in general). Looking fo

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Hunter Peress (Guest)
on 2006-01-10 01:26
(Received via mailing list)
Thanks to a bit of help from various source in the community, I've
been able to find something that works with fastcgi
and surely should work with webbrick.

I tried -idle-timeout with the FastCgiConfig/FastCgiServer directives
and they failed, eg
FastCgiServer /www/vhosts/whatever/public/dispatch.fcgi -idle-timeout 30
left me with dispatch.fcgi still using up 98% of the cpu on my
intentional infinite loop test.

I tried require "timeout" and Timeout::timeout(2){ logger.info('im
here') } in dispatch.fcgi and that failed (pretty sure).


What did work came by suggestion.

In an ApplicationController do:
     def process(*args)
         timeout(30) { logger.info('killed by me'); super }
     end

and it seems that it only takes care of one response (did some testing).


But, I would like if someone could point out the error in my
FastCgiServer attempt.

Thanks.
------------------------------------------------------------------------

Hunter Peress
removed_email_address@domain.invalid
Web Programmer
The Santa Fe New Mexican, Inc.
www.freenewmexican.com
This topic is locked and can not be replied to.