Forum: Ruby on Rails Lightty idle-timeout - does it work?

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.
Derek C. (Guest)
on 2005-12-22 17:33
(Received via mailing list)
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?
James duncan D. (Guest)
on 2005-12-22 20:39
Derek C. 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
Derek C. (Guest)
on 2005-12-22 21:11
(Received via mailing list)
Thanks for the reply... bummer! At least I now know that I wasn't
being thick!
This topic is locked and can not be replied to.