Max Execution Time with fastcgi (and in general). Looking fo

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){‘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) {‘killed by me’); super }

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.


Hunter Peress
[email protected]
Web Programmer
The Santa Fe New Mexican, Inc.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs