Hi all I''m currently running rails on apache/windows and it seems like rails has trouble getting started the first few times I start apache and request a page. I created a blank controller called ''test'', and it has an index method and associated index.rhtml file. (All it contains is <p>hello world</p>) I keep getting ''500 server error''. I have to try to load the page several times and eventually the page does load, (with no modification to the code or apache setup!). The only thing I have to do to get the page to load is hit refresh a dozen times or so. here''s the error I get in the apache log with every failed request: [Tue Mar 01 16:05:06 2005] [error] [client 127.0.0.1] FastCGI: comm with (dynamic) server "C:/XXXXXXXXXX/public/dispatch.fcgi" aborted: (first read) idle timeout (30 sec) [Tue Mar 01 16:05:06 2005] [error] [client 127.0.0.1] FastCGI: incomplete headers (0 bytes) received from server "C:/XXXXXXXXXX/public/dispatch.fcgi" it runs perfectly in webrick, but I seem to have a ghost in the apache machine. does anyone have any idea what could be wrong? thanks dylan
it seems, that your application needs more than 30 sec to handle the request. the fastcgi process stops waiting for the application after 30 sec by default. you can set a higher value in your apache configuration like this: FastCgiServer /var/www/prod_shop/public/dispatch.fcgi -initial-env RAILS_ENV=production -idle-timeout 60 the idle-timeout parameter does the trick. Am Dienstag, den 01.03.2005, 16:12 +0000 schrieb Dylan:> [Tue Mar 01 16:05:06 2005] [error] [client 127.0.0.1] FastCGI: comm > with > (dynamic) server "C:/XXXXXXXXXX/public/dispatch.fcgi" aborted: (first > read) idle timeout (30 sec) > > [Tue Mar 01 16:05:06 2005] [error] [client 127.0.0.1] FastCGI: > incomplete headers (0 bytes) received from server > "C:/XXXXXXXXXX/public/dispatch.fcgi"-- Norman Timmler Holländische Reihe 31 22765 Hamburg +49 (0)40 / 43 25 10 80 mailto:norman-QkIQCVqxERM@public.gmane.org
> FastCgiServer /var/www/prod_shop/public/dispatch.fcgi -initial-env > RAILS_ENV=production -idle-timeout 60That may work, but there is definetly an underlying problem if it takes 30 seconds to display "hello world". Quoted from the bottom of http://wiki.rubyonrails.com/rails/show/FastCGI "Make sure you are running the C-based fcgi driver. Especially after you update Ruby you usually have to recompile all C-based extensions. However fcgi ships with a totally broken Ruby-based version which silently takes over. If you have odd problems on your fastcgi page, like pages which only load half and finish 15 seconds later, just reinstall fcgi with gem install fcgi"
thanks for your suggestion. it didn''t fix it but it''s handy to know all the same. for anyone else in the same boat, I was using WAMP5 with the apache 2 add-on (wampserver.com), and it was playing up despite a few clean installations. I''ve run just the standalone apache2 installer from the apache group and the problems have dissapeared so I can think we can safely say wampserver doesn''t play nice with rails. Belorion wrote:>>FastCgiServer /var/www/prod_shop/public/dispatch.fcgi -initial-env >>RAILS_ENV=production -idle-timeout 60 > > > That may work, but there is definetly an underlying problem if it > takes 30 seconds to display "hello world". > > Quoted from the bottom of http://wiki.rubyonrails.com/rails/show/FastCGI > > "Make sure you are running the C-based fcgi driver. Especially after > you update Ruby you usually have to recompile all C-based extensions. > However fcgi ships with a totally broken Ruby-based version which > silently takes over. If you have odd problems on your fastcgi page, > like pages which only load half and finish 15 seconds later, just > reinstall fcgi with > > gem install fcgi" > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >