David wrote about watching the timeout for FCGI: http://weblog.rubyonrails.com/archives/2005/01/03/watch-for-huge- requests-on-default-fcgi/#comments But where''s the setting? Is it in the apache config file, in Rails somewhere, or? /Lars
On Jan 4, 2005, at 7:35 PM, Lars Pind wrote:> David wrote about watching the timeout for FCGI: > http://weblog.rubyonrails.com/archives/2005/01/03/watch-for-huge- > requests-on-default-fcgi/#comments > But where''s the setting? Is it in the apache config file, in Rails > somewhere, or? > > /Lars >I don''t know what they''re using but here''s how I config it for PHP and Ruby dynamic apps in Apache2 <IfModule mod_fastcgi.c> FastCgiIpcDir /usr/local/www/fcgi_ipc/tmp AddHandler fastcgi-script .fcgi FastCgiSuexec /usr/local/sbin/suexec FastCgiConfig -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 120 -pass-header HTTP_AUTHORIZATION </IfModule> That''s at least the FastCGI config for textdrive.com (PHP5-fastcgi), rubyonrails.org (PHP4-fastcgi and Ruby), standardbehaviour.com (Ruby) and wordpress.org (PHP5-fastcgi) .... At least I''m assuming that David''s using fcgi for manuals.rubyonrails.org, I know Marten is using it for standardbehaviour.com. - Jason
Just adding to this. For ruby apps on production servers i would add -restart -initial-env RAILS_ENV=production to the FastCgiConfig directive. Especially -restart seemed to have fixed a lot of fastcgi quirks with applications which where never started again after a crash. On Tue, 4 Jan 2005 19:52:47 -0800, Jason Hoffman <jason-0PGoR/GKms8ttkmooHk4QwC/G2K4zDHf@public.gmane.org> wrote:> On Jan 4, 2005, at 7:35 PM, Lars Pind wrote: > > David wrote about watching the timeout for FCGI: > > http://weblog.rubyonrails.com/archives/2005/01/03/watch-for-huge- > > requests-on-default-fcgi/#comments > > But where''s the setting? Is it in the apache config file, in Rails > > somewhere, or? > > > > /Lars > > > > I don''t know what they''re using but here''s how I config it for PHP and > Ruby dynamic apps in Apache2 > > <IfModule mod_fastcgi.c> > FastCgiIpcDir /usr/local/www/fcgi_ipc/tmp > AddHandler fastcgi-script .fcgi > FastCgiSuexec /usr/local/sbin/suexec > FastCgiConfig -singleThreshold 100 -killInterval 300 -autoUpdate > -idle-timeout 120 -pass-header HTTP_AUTHORIZATION > </IfModule> > > That''s at least the FastCGI config for textdrive.com (PHP5-fastcgi), > rubyonrails.org (PHP4-fastcgi and Ruby), standardbehaviour.com (Ruby) > and wordpress.org (PHP5-fastcgi) .... > > At least I''m assuming that David''s using fcgi for > manuals.rubyonrails.org, I know Marten is using it for > standardbehaviour.com. > > - Jason > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog
On Jan 4, 2005, at 9:16 PM, Tobias Luetke wrote:> Just adding to this. For ruby apps on production servers i would add > -restart -initial-env RAILS_ENV=production to the FastCgiConfig > directive. Especially -restart seemed to have fixed a lot of fastcgi > quirks with applications which where never started again after a > crash.Restart is quite nice, just don''t use it with autoupdate that had in the last one, historically they haven''t liked each other. And if you do this under a suexec situation, the env variables like RAILS_ENV likely have to be moved into a wrapper. And once things are really running, then it''s time to pay with -processSlack (nice one under load), -maxProcesses and -listen-queue-depth. - Jason