Jonathan Métillon
2007-04-16 21:45:28 UTC
Hi,
I deployed my app on a dedicated production machine which runs GNU/
Linux Debian Sarge, Ruby 1.8.5, Rails 1.1.6, and it's served with
LightTPD 1.4.11 and FastCGI.
The machine is a VMWare virtual machine with 512 MB RAM allocated. The
host machine is a Dell PowerEdge 1650 with 2 x Intel Pentium III 1.4
Ghz. But because of VMWare license, only one CPU is enabled.
I only have one address IP for this machine, and hundreds of domain
names pointing to my Rails app. All requests are handled by this
FastCGI configuration:
fastcgi.server = ( ".fcgi" =>
( "localhost" =>
( "min-procs" => 2,
"max-procs" => 2,
"socket" => "/tmp/" + var.app + ".fcgi.socket",
"bin-path" => server.document-root + "/dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" => "production" )
)
)
)
Here are my questions:
1. When I use script/process/reaper I get:
Restarting [30315] /usr/local/bin/ruby /var/web/vero/current/public/
dispatch.fcgi
Restarting [30317] /usr/local/bin/ruby /var/web/vero/current/public/
dispatch.fcgi
Restarting [29089] /usr/local/bin/ruby /var/web/vero/current/public/
dispatch.fcgi
Restarting [29090] /usr/local/bin/ruby /var/web/vero/current/public/
dispatch.fcgi
Why do I see 4 processes restarting when I asked for 2 processes in
the FastCGI configuration?
2. I want to use page caching. But as my application receives requests
from many domain names, and content vary with each domain name, I need
a different cache for each domain name. How can I do that, as the page
caching is dependent on the document-root, which is fixed?
3. Is there a more efficient solution in my case, using maybe nginx,
apache or else? Not forgetting I don't have much RAM...
Thank you very much for you help!
I deployed my app on a dedicated production machine which runs GNU/
Linux Debian Sarge, Ruby 1.8.5, Rails 1.1.6, and it's served with
LightTPD 1.4.11 and FastCGI.
The machine is a VMWare virtual machine with 512 MB RAM allocated. The
host machine is a Dell PowerEdge 1650 with 2 x Intel Pentium III 1.4
Ghz. But because of VMWare license, only one CPU is enabled.
I only have one address IP for this machine, and hundreds of domain
names pointing to my Rails app. All requests are handled by this
FastCGI configuration:
fastcgi.server = ( ".fcgi" =>
( "localhost" =>
( "min-procs" => 2,
"max-procs" => 2,
"socket" => "/tmp/" + var.app + ".fcgi.socket",
"bin-path" => server.document-root + "/dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" => "production" )
)
)
)
Here are my questions:
1. When I use script/process/reaper I get:
Restarting [30315] /usr/local/bin/ruby /var/web/vero/current/public/
dispatch.fcgi
Restarting [30317] /usr/local/bin/ruby /var/web/vero/current/public/
dispatch.fcgi
Restarting [29089] /usr/local/bin/ruby /var/web/vero/current/public/
dispatch.fcgi
Restarting [29090] /usr/local/bin/ruby /var/web/vero/current/public/
dispatch.fcgi
Why do I see 4 processes restarting when I asked for 2 processes in
the FastCGI configuration?
2. I want to use page caching. But as my application receives requests
from many domain names, and content vary with each domain name, I need
a different cache for each domain name. How can I do that, as the page
caching is dependent on the document-root, which is fixed?
3. Is there a more efficient solution in my case, using maybe nginx,
apache or else? Not forgetting I don't have much RAM...
Thank you very much for you help!