The hand you are seeing is because you are using 12 dispatchers. Those
twelve dispatcher processes each take up anywhere from 20Mb to 90MB
each so when your site is not getting hit for a while, those
dispatchers get swapped out of memory to disk and that could mean paging
back in 12*(20Mb-90Mb). So when you come back and hit the site, all
twelve dispatchers need to get paged back into memory and this can take
a while especially with 12 processes.
The min-procs does not do anything in lighttpd currently, its
deprecated for now. So whatever you set your max-procs to is what will
get started up when you start lighty. You probably only need one or two
dispatcher until your site is geting major traffic. For dev just use one
fcgi unless you need two for upload_progress or something else that
requires two dispatchers at once.
Now one way to keep the hang from happening when there is inactiv is
to use wget or curl with a cron job to grab a dynamic page from your
site and send the output to /dev/null. This ‘exercises’ your fcgi’s so
they don’t get swapped out of main memory.
From: Bogdan I. [mailto:[email protected]]
To: [email protected]
Sent: Sat, 25 Mar 2006 02:4505 -0800
Subject: Re: [Rails] Rails and Lighttpd, hangs?
The answer is no.
You will most likely never need 12 dispatchers, especially when your
RAILS_ENV is development.
Each dispatcher is attempting to get its share of memory, so that could
be the reason for your site to hang.
On 3/25/06, Berlin B. [email protected] wrote: I know this is
kind of a generic question. But, when hitting my
lighttpd/rails site on some of the first hits, the site hangs. I
think it has something with the lighttpd configuration, possibly
something I am missing with rails or ruby? Any ideas or how to track
fastcgi.server = (
“.fcgi” => (
“0.0.0.0” => (
“socket” => “/home/bbrown/light/lighttpd/log/fast.socket”,
“min-procs” => 2,
“max-procs” => 12,
“idle-timeout” => 30,
“bin-environment” => ( “RAILS_ENV” => “development” ),
ruby 1.8.3 (2005-06-23) [i486-linux]
Rails mailing list