# Lightty idle-timeout - does it work?

**URL:** <https://www.ruby-forum.com/t/lightty-idle-timeout-does-it-work/50905>\
**Category:** Rails\
**Created:** [December 22, 2005, 4:33pm UTC](https://www.ruby-forum.com/t/lightty-idle-timeout-does-it-work/50905 "2005-12-22T16:33:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![derek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b38774/32.png) [@derek](https://www.ruby-forum.com/u/derek)\
**Post date:** [December 22, 2005, 4:33pm UTC](https://www.ruby-forum.com/t/lightty-idle-timeout-does-it-work/50905/1 "2005-12-22T16:33:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![derek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b38774/32.png) [@derek](https://www.ruby-forum.com/u/derek)\
**Post date:** [December 22, 2005, 7:39pm UTC](https://www.ruby-forum.com/t/lightty-idle-timeout-does-it-work/50905/2 "2005-12-22T19:39:27Z")

</div>

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](http://www.lighttpd.net/documentation/fastcgi.html) itself states that it was disabled in 1.3.14.  
This appears to be true even through the latest 1.4.x releases.

---

<div class="post-metadata">

**Author:** ![derek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b38774/32.png) [@derek](https://www.ruby-forum.com/u/derek)\
**Post date:** [December 22, 2005, 8:11pm UTC](https://www.ruby-forum.com/t/lightty-idle-timeout-does-it-work/50905/3 "2005-12-22T20:11:36Z")

</div>

Thanks for the reply… bummer! At least I now know that I wasn’t  
being thick!
