Rails and Lighttpd, hangs?


#1

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
this down.

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-path” =>
“/home/bbrown/light/BotVerse/web/botverse/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “development” ),
)
)
)

ruby 1.8.3 (2005-06-23) [i486-linux]

Rails 1.0.0


#2

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.


#3

Ezra Zymuntowicz wrote:

The min-procs does not do anything in lighttpd currently, its 


could be the reason for your site to hang.
    this down.
    "/home/bbrown/light/BotVerse/web/botverse/public/dispatch.fcgi",
    removed_email_address@domain.invalid <mailto:removed_email_address@domain.invalid>

removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

I added the 12 procs as a test. I had the issue when I had 1 and 1 max
procs.


Berlin B.
(ramaza3 on freenode)
http://www.newspiritcompany.com
also checkout alpha version of botverse:
http://www.newspiritcompany.com:8086/universe_home


#4

Berlin-

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.

Cheers-

-Ezra

   _____

From: Bogdan I. [mailto:removed_email_address@domain.invalid]
To: removed_email_address@domain.invalid
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. removed_email_address@domain.invalid 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
this down.

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-path” =>
“/home/bbrown/light/BotVerse/web/botverse/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “development” ),
)
)
)

ruby 1.8.3 (2005-06-23) [i486-linux]

Rails 1.0.0


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails