Are you using lighttpd? Do you have the excute bit set on public/dispatch.*? H M wrote:>I was able to finally get my app running under FastCGI on Texdrive >after gethering bits and pieces of the required information from >wikis, blogs etc. this morning. > >Just when I thought the worst was behind me, strange errors starting >rearing their ugly heads. The same pages that work fine will randomly >stop working and instead display the dreaded "Rails application failed >to start properly" message. The strange part is that the same page >shows correctly if I press Enter in the search bar instead of pressing >the submit button. I KNOW it''s not a problem with my app because the >development log doesn''t show any errors. > >I dug into the logs in an attempt to find out what was going on under >the hood. The logs show the following when I get the above mentioned >error: > >browser: displays "Rails application failed to start properly" > >development log: no errors. SQL queries merrily fetching results and >printing colourful messages in the log file. > >fastcgi.crash.log: (there are a bunch of these errors in the log and >don''t neccessarily happen at the same time as the error) > >[Wed Apr 20 03:18:01 GMT 2005] Dispatcher failed to catch: exit (SystemExit) > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10:in `exit'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10 > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10:in `call'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' > dispatch.fcgi:18 >FCGI process 64828 killed by this error > >Not much information here. > >As mentioned above, when the error occurs, I can get rid of it by >issuing a GET instead of a POST. Inspecting the access.log confirms >this: > >70.28.36.57 - - [20/Apr/2005:03:17:22 +0000] "POST /exam/1/6 HTTP/1.1" >500 80 "http://www.estound.com/exam/1/1" "... >70.28.36.57 - - [20/Apr/2005:03:17:38 +0000] "POST /exam/1/6 HTTP/1.1" >500 80 "http://www.estound.com/exam/1/1" "... >70.28.36.57 - - [20/Apr/2005:03:17:42 +0000] "POST /exam/1/6 HTTP/1.1" >500 80 "http://www.estound.com/exam/1/1" "... >70.28.36.57 - - [20/Apr/2005:03:17:45 +0000] "GET /exam/1/6 HTTP/1.1" >200 9760 "-" "... > >Note the 500 for POST and 200 for GET. > >So, has anyone else experience these errors and figured out what''s causing them? > >Any help will be appreciated immensely. > >Thanks > >Hammed >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
I was able to finally get my app running under FastCGI on Texdrive after gethering bits and pieces of the required information from wikis, blogs etc. this morning. Just when I thought the worst was behind me, strange errors starting rearing their ugly heads. The same pages that work fine will randomly stop working and instead display the dreaded "Rails application failed to start properly" message. The strange part is that the same page shows correctly if I press Enter in the search bar instead of pressing the submit button. I KNOW it''s not a problem with my app because the development log doesn''t show any errors. I dug into the logs in an attempt to find out what was going on under the hood. The logs show the following when I get the above mentioned error: browser: displays "Rails application failed to start properly" development log: no errors. SQL queries merrily fetching results and printing colourful messages in the log file. fastcgi.crash.log: (there are a bunch of these errors in the log and don''t neccessarily happen at the same time as the error) [Wed Apr 20 03:18:01 GMT 2005] Dispatcher failed to catch: exit (SystemExit) /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10:in `exit'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10 /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10:in `call'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' dispatch.fcgi:18 FCGI process 64828 killed by this error Not much information here. As mentioned above, when the error occurs, I can get rid of it by issuing a GET instead of a POST. Inspecting the access.log confirms this: 70.28.36.57 - - [20/Apr/2005:03:17:22 +0000] "POST /exam/1/6 HTTP/1.1" 500 80 "http://www.estound.com/exam/1/1" "... 70.28.36.57 - - [20/Apr/2005:03:17:38 +0000] "POST /exam/1/6 HTTP/1.1" 500 80 "http://www.estound.com/exam/1/1" "... 70.28.36.57 - - [20/Apr/2005:03:17:42 +0000] "POST /exam/1/6 HTTP/1.1" 500 80 "http://www.estound.com/exam/1/1" "... 70.28.36.57 - - [20/Apr/2005:03:17:45 +0000] "GET /exam/1/6 HTTP/1.1" 200 9760 "-" "... Note the 500 for POST and 200 for GET. So, has anyone else experience these errors and figured out what''s causing them? Any help will be appreciated immensely. Thanks Hammed
H M wrote:> >[Wed Apr 20 03:18:01 GMT 2005] Dispatcher failed to catch: exit (SystemExit) > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10:in `exit'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10 > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:10:in `call'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' > dispatch.fcgi:18 >FCGI process 64828 killed by this error > >Not much information here. > >.... > >So, has anyone else experience these errors and figured out what''s causing them? > >Any help will be appreciated immensely. > > >I am experiencing these errors while running ab -n 150 http://mysite.com/ Looks like every n-th request dies for unknown reasons. I experienced this in both my production lighttpd + fastCGI setup as well as on my development linux box. The production server runs Debian Sarge and Lighttpd in chroot sandbox with FastCGI. The Lighttpd configuration is quite standard. The development box runs Debian Unstable with the latest Lighttpd compiled into .deb These errors show up both with ruby-fastcgi as well as with fcgi installed via gems so I don''t think the problem lies in fcgi library but who knows ? :) I don''t know if the above errors are connected with the poor performance of my Lighttpds (about 10 reqs/s) (both in production and development). I tried setting server.event-handler = "linux-sysepoll" in Lighttpd configuration but no results. I also noticed that page caching doesn''t work at all, it should create directories and files in RAILS_ROOT/public but it doesn''t happen although permissions exists for the web user so I guess something must be wrong with my Rails+Lighttpd setup. So with or without caching I get 10 reqs/s on a simple web appilication. Anyway, I will try to upgrade to the newest ruby libraries, and tweaking lighttpd configuration more and will let you know if I find anything useful. -- Best Karol Hosiawa
I switched to Lighttpd yesterday and at first it appeared to be working correctly but I''m seeing the same problem again. The same request with a GET works but fails on POST as the logs below show: GET: 209.112.20.2 - - [20/Apr/2005:16:54:39 +0000] "GET /exam/1/1 HTTP/1.1" 200 10205 "http://estound.com/exam/confirm/1?section_id=1" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" POST: 209.112.20.2 - - [20/Apr/2005:16:54:47 +0000] "POST /exam/by_filter?id=1&end_exam=true HTTP/1.1" 502 353 "http://estound.com/exam/1/1" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" I''ve looked into the lighttpd error logs but can''t see anything strange there. The only odd thing is the following (in lighttpd error log): 2005-04-20 16:11:58: (response.c.1062) Path : /home/airmalik/cma/public/exam/1/9 2005-04-20 16:11:58: (response.c.1078) -- handling physical path 2005-04-20 16:11:58: (response.c.1079) Path : /home/airmalik/cma/public/exam/1/9 2005-04-20 16:11:58: (response.c.1158) file not found: /exam/1/9 -> /home/airmalik/cma/public//exam Note the double / above where it says file not found. Initially I thought this was the culprit but the same error appears in a GET request which works. This is getting really frustrating. I think I''ve spent more time trying to get the installation working than I did working on the app :(