On 16-okt-2005, at 19:58, Hunter Hillegas wrote:
> Based on what I see on my server, I think I need some help
> understanding the
> FCGI options.
>
> I have FCGI setup as follows:
>
> FastCgiServer /apps/myapp/public/dispatch.fcgi -initial-env
> RAILS_ENV=production -processes 3 -idle-timeout 60
>
> I got this configuration example from somewhere on the Rails site
> and used
> it. It works.
>
> I took the ''processes'' parameter to indicate the number
of fcgi
> processes
> for Apache to start and use.
>
> Right before my server crashed, that app had 38 processes of
> dispatch.fcgi
> for that app... It ran away and the server died.
>
> So, how can I prevent endless spawning of FastCGI processes and
> also that
> they are disposed of when they are no longer being used/useful.
You cannot dispose them until the server is stopped (at least one
will be always hanging). However, you can minimize
their amount - for this you will need more directives than what is
stated on the Rails wiki.
I use this with dynamic spawning and it works OK.
FastCgiConfig -processSlack 1 -maxClassProcesses 1 -maxProcesses
1 -initial-env RAILS_ENV=development
From there you can configure maxClassProcesses and maxProcesses in
parallel and see how it works for you.
--
Julian "Julik" Tarkhanov