Rails 1.0 on RedHat with MySQL It seems that my app stops functioning overnight [actually I am assuming that it is after a period of inactivity]. Googling around for solutions, it seems that it might be an issue with timeouts on the MySQL session. A suggestion I found was to a) increase timeout on MySQL [don''t want to do that]; b) add idle-timeout parameter to Lightty. So I have in my lighttpd.conf: fastcgi.server = ( ".fcgi" => ( "localhost" => ( "min-procs" => 1, "max-procs" => 2, "idle-timeout" => 60, <==== added this line "socket" => "log/fcgi.socket", "bin-path" => "public/dispatch.fcgi", "bin-environment" => ( "RAILS_ENV" => "development" ) ) ) ) [Yes - 60 seconds is too low, but this is just a test] My understanding is that Lightty should terminate an FCGI process if it has been idle for that amount of time. But the dispatch.fcgi processes appear to never get terminated. Is this a lightty bug; a Rails bug; my brain bug? And is this the correct solution to my timeout problem anyway?
Derek Chesterfield wrote:> fastcgi.server = ( ".fcgi" => > ( "localhost" => > ( > "min-procs" => 1, > "max-procs" => 2, > "idle-timeout" => 60, <==== added this line > "socket" => "log/fcgi.socket", > "bin-path" => "public/dispatch.fcgi", > "bin-environment" => ( "RAILS_ENV" => "development" ) > ) > ) > ) > > My understanding is that Lightty should terminate an FCGI process if > it has been idle for that amount of time. But the dispatch.fcgi > processes appear to never get terminated.Adaptive process spawning doesn''t work in my observations with lighty. And, the documentation[1] itself states that it was disabled in 1.3.14. This appears to be true even through the latest 1.4.x releases. [1]: http://www.lighttpd.net/documentation/fastcgi.html -- Posted via http://www.ruby-forum.com/.
Thanks for the reply... bummer! At least I now know that I wasn''t being thick! On 22 Dec 2005, at 6:39pm, James Duncan Davidson wrote:> Adaptive process spawning doesn''t work in my observations with lighty. > And, the documentation[1] itself states that it was disabled in > 1.3.14. > This appears to be true even through the latest 1.4.x releases. > > [1]: http://www.lighttpd.net/documentation/fastcgi.html