Chris Lowis
2006-Aug-16 10:08 UTC
[Rails] Dreamhost FastCGI: incomplete headers (0 bytes) errors
Sorry to trouble the list with another Dreamhost problem, but looking through the archives I see nothing that can solve my problem. I have installed my app as per http://wiki.dreamhost.com/index.php/Ruby_on_Rails#Quick_Start_Guide_August_2006 with a symbolic link from my_domain.tld in ~/ to ~/apps/residence/public/ I get the Rails welcome screen. I have uploaded my app directory etc, and populated my database. If I start Webrick in production mode on dreamhost I can access the website fine, and everything seems to work. I have a dispatch.fcgi file that reads : #!/usr/bin/ruby require File.dirname(__FILE__) + "/../config/environment" require ''fcgi_handler'' class RailsFCGIHandler private def frao_handler(signal) dispatcher_log :info, "asked to terminate immediately" dispatcher_log :info, "frao handler working its magic!" restart_handler(signal) end alias_method :exit_now_handler, :frao_handler end RailsFCGIHandler.process! and a line in public/.htacces that reads: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] Unfortunately I cannot access my app. After a couple of minutes I get a Application error Rails application failed to start properly and [Wed Aug 16 03:01:05 2006] [error] [client 88.110.215.43] FastCGI: comm with (dynamic) server "/home/c_lowis/residence-review.com/dispatch.fcgi" aborted: (first read) idle timeout (120 sec) [Wed Aug 16 03:01:05 2006] [error] [client 88.110.215.43] FastCGI: incomplete headers (0 bytes) received from server "/home/c_lowis/residence-review.com/dispatch.fcgi" in my error.log in the ~/logs/ directory. Changing the shebang in dispatch.* doesn''t seem to make a difference. Does anybody have any ideas ? Kind regards, Chris -- Posted via http://www.ruby-forum.com/.
Gene Horodecki
2006-Aug-17 03:09 UTC
[Rails] Dreamhost FastCGI: incomplete headers (0 bytes) errors
I''m in the exact same boat! Did you ever figure it out? On 8/16/06, Chris Lowis <chris.lowis@gmail.com> wrote:> > Sorry to trouble the list with another Dreamhost problem, but looking > through the archives I see nothing that can solve my problem. > > I have installed my app as per > > http://wiki.dreamhost.com/index.php/Ruby_on_Rails#Quick_Start_Guide_August_2006 > > with a symbolic link from my_domain.tld in ~/ to > ~/apps/residence/public/ > > I get the Rails welcome screen. I have uploaded my app directory etc, > and populated my database. If I start Webrick in production mode on > dreamhost I can access the website fine, and everything seems to work. > > I have a dispatch.fcgi file that reads : > > #!/usr/bin/ruby > require File.dirname(__FILE__) + "/../config/environment" > require ''fcgi_handler'' > > class RailsFCGIHandler > private > def frao_handler(signal) > dispatcher_log :info, "asked to terminate immediately" > dispatcher_log :info, "frao handler working its magic!" > restart_handler(signal) > end > alias_method :exit_now_handler, :frao_handler > end > > RailsFCGIHandler.process! > > and a line in public/.htacces that reads: > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > > Unfortunately I cannot access my app. After a couple of minutes I get a > Application error > Rails application failed to start properly > > and > > [Wed Aug 16 03:01:05 2006] [error] [client 88.110.215.43] FastCGI: comm > with (dynamic) server "/home/c_lowis/residence-review.com/dispatch.fcgi" > aborted: (first read) idle timeout (120 sec) > [Wed Aug 16 03:01:05 2006] [error] [client 88.110.215.43] FastCGI: > incomplete headers (0 bytes) received from server > "/home/c_lowis/residence-review.com/dispatch.fcgi" > > in my error.log in the ~/logs/ directory. > > Changing the shebang in dispatch.* doesn''t seem to make a difference. > Does anybody have any ideas ? > > Kind regards, > > Chris > > > > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/53a87cdb/attachment-0001.html
Chris Lowis
2006-Aug-17 08:02 UTC
[Rails] Re: Dreamhost FastCGI: incomplete headers (0 bytes) errors
Gene Horodecki wrote:> I''m in the exact same boat! Did you ever figure it out?Well, in the end I managed to get something working by not symlinking my-domain.tld in ~/ to another directory where my app is installed. Rather run: $ rails my-domain.tld in ~/ and follow the rest of the wiki page from there. Now I am having all kinds of problems with getting rails to recognise that gems are installed. All my controllers that use features from other gems (I''ve tried SimpleSearch and Ferret) give me uninitialized constant errors in the production.log. It''s quite a frustrating experience ! I''d appreciate any pointers, Chris -- Posted via http://www.ruby-forum.com/.
J "Brien"
2006-Aug-17 18:08 UTC
[Rails] Re: Dreamhost FastCGI: incomplete headers (0 bytes) errors
make sure your .profile (or whatever your shell file is) has your paths for locally install gems. As for the fcgi errors i have found that this typically happens when the tmp/ and log/ folders are not available for rails to write into. This happens when I launch a new app from svn as i put svn:ignore on the folders. another thing that has helped is forcing GC to happen in your dispatch.fcgi. I find 50 requests works well. Hope this helps On 8/17/06, Chris Lowis <chris.lowis@gmail.com> wrote:> > Gene Horodecki wrote: > > I''m in the exact same boat! Did you ever figure it out? > > Well, in the end I managed to get something working by not symlinking > my-domain.tld in ~/ to another directory where my app is installed. > Rather run: > $ rails my-domain.tld in ~/ > > and follow the rest of the wiki page from there. > > Now I am having all kinds of problems with getting rails to recognise > that gems are installed. All my controllers that use features from other > gems (I''ve tried SimpleSearch and Ferret) give me > uninitialized constant > > errors in the production.log. It''s quite a frustrating experience ! I''d > appreciate any pointers, > > Chris > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- J "Brien" | HybridIndie Productions | http://hybridindie.com | hybridindie@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/6fe1a511/attachment-0001.html
Jodi Showers
2006-Aug-17 18:16 UTC
[Rails] Re: Dreamhost FastCGI: incomplete headers (0 bytes) errors
I suggest you run dispatch.fcgi from the command line - you''ll generally get more info that way cheers,J On 17-Aug-06, at 2:08 PM, J "Brien" wrote:> make sure your .profile (or whatever your shell file is) has your > paths for locally install gems. As for the fcgi errors i have found > that this typically happens when the tmp/ and log/ folders are not > available for rails to write into. This happens when I launch a new > app from svn as i put svn:ignore on the folders. another thing that > has helped is forcing GC to happen in your dispatch.fcgi. I find 50 > requests works well. Hope this helps > > On 8/17/06, Chris Lowis <chris.lowis@gmail.com > wrote: > Gene Horodecki wrote: > > I''m in the exact same boat! Did you ever figure it out? > > Well, in the end I managed to get something working by not symlinking > my-domain.tld in ~/ to another directory where my app is installed. > Rather run: > $ rails my-domain.tld in ~/ > > and follow the rest of the wiki page from there. > > Now I am having all kinds of problems with getting rails to recognise > that gems are installed. All my controllers that use features from > other > gems (I''ve tried SimpleSearch and Ferret) give me > uninitialized constant > > errors in the production.log. It''s quite a frustrating > experience ! I''d > appreciate any pointers, > > Chris > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -- > J "Brien" | HybridIndie Productions | http://hybridindie.com | > hybridindie@gmail.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/409c69c5/attachment.html
Chris Lowis
2006-Aug-17 18:51 UTC
[Rails] Re: Re: Dreamhost FastCGI: incomplete headers (0 bytes) erro
Jodi Showers wrote:> I suggest you run dispatch.fcgi from the command line - you''ll > generally get more info that way > > cheers,JThanks to both of you for your useful insights . At the moment things seem to be working ok, although I''ve had to abandon ferret for the time being :( The GC suggestion is something I haven''t tried, perhaps that may help . Local development with Mongrel is so much nicer ! There''s a support request open for dreamhost users to vote for Mongrel support - if anyone is interested you can vote here : https://panel.dreamhost.com/index.cgi?tree=home.sugg&category=Software%20Installations&search=mongrel regards, Chris -- Posted via http://www.ruby-forum.com/.