Experience with ferret on Dreamhost?

Does anybody have experience with running ferret on dreamhost ?

My app is running ok until I install the acts_as_ferret plugin, at which
point I get “Rails application failed to start properly” errors. I’ve
used script/console to confirm that I can require ‘ferret’ and make a
new Index object . Everything appears to be ok in that respect.
Unfortunately there is nothing logged in these circumstances, except :

[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI: comm
with (dynamic) server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi” aborted:
(first read) idle timeout (120 sec)
[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI:
incomplete headers (0 bytes) received from server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi”

in the “apache” type logs that dreamhost gives me . Through trial and
error I am fairly sure it is ferret that is causing this, as when I
remove the plugin the site works ok.

I am using ferret 0.9.5 . As far as I can see dispatch.fcgi is not
starting.

Would appreciate any comments,

Chris

Hi, I am experiencing exactly the same phenomenon.
Everything works find on my powerbook, but not on DH. I changed
bash_profile to add my local .gems directory and installed ferret with
no apparent problems. I added a line to environment.rb as instructed in
the wiki but still get the same problems when I try to deploy my new
site (via Capistrano). Likewise I think dispatch.fcgi is not starting.

Any ideas?

Chris L. wrote:

Does anybody have experience with running ferret on dreamhost ?

My app is running ok until I install the acts_as_ferret plugin, at which
point I get “Rails application failed to start properly” errors. I’ve
used script/console to confirm that I can require ‘ferret’ and make a
new Index object . Everything appears to be ok in that respect.
Unfortunately there is nothing logged in these circumstances, except :

[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI: comm
with (dynamic) server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi” aborted:
(first read) idle timeout (120 sec)
[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI:
incomplete headers (0 bytes) received from server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi”

in the “apache” type logs that dreamhost gives me . Through trial and
error I am fairly sure it is ferret that is causing this, as when I
remove the plugin the site works ok.

I am using ferret 0.9.5 . As far as I can see dispatch.fcgi is not
starting.

Would appreciate any comments,

Chris

I think I figured out this problem. All you had to do was add this line
to the top of environment.rb

ENV[‘GEM_PATH’] = ‘/home/USERNAME/.gems’ + ‘:/usr/lib/ruby/gems/1.8’

The DH wiki says to put the following, but it didn’t seem to work.

ENV[‘GEM_PATH’] = File.expand_path(’~/.gems’) +
‘:/usr/lib/ruby/gems/1.8’

I actually created a new test project in dev. mode and saw an error
some where like “couldn’t expand ~” or “unknown comand expand_path” or
something like that and just put in the absolute path as above on a
whim. Then it worked fine.

anrake wrote:

Hi, I am experiencing exactly the same phenomenon.
Everything works find on my powerbook, but not on DH. I changed
bash_profile to add my local .gems directory and installed ferret with
no apparent problems. I added a line to environment.rb as instructed in
the wiki but still get the same problems when I try to deploy my new
site (via Capistrano). Likewise I think dispatch.fcgi is not starting.

Any ideas?

Chris L. wrote:

Does anybody have experience with running ferret on dreamhost ?

My app is running ok until I install the acts_as_ferret plugin, at which
point I get “Rails application failed to start properly” errors. I’ve
used script/console to confirm that I can require ‘ferret’ and make a
new Index object . Everything appears to be ok in that respect.
Unfortunately there is nothing logged in these circumstances, except :

[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI: comm
with (dynamic) server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi” aborted:
(first read) idle timeout (120 sec)
[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI:
incomplete headers (0 bytes) received from server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi”

in the “apache” type logs that dreamhost gives me . Through trial and
error I am fairly sure it is ferret that is causing this, as when I
remove the plugin the site works ok.

I am using ferret 0.9.5 . As far as I can see dispatch.fcgi is not
starting.

Would appreciate any comments,

Chris

I recently put a site up on dreamhost (my first on dh, and my first
using ferret/aaf). I don’t believe I had the problem stated below, but
it’s hard to tell. On occassion it appears that fastcgi isn’t starting,
but if I poke at it a bit (touch dispatch.fcgi) enough, it eventually
will fire up.

Pages without ferret appear to work fine.

Search pages, however, barely/rarely work. My guess is that dreamhost
is killing the fastcgi process due to high cpu and/or memory, but I’m
not sure how to verify that.

In script/console, I ran a search and it took about 50 seconds to
return. So clearly I have something amiss with my ferret/aaf config or
how I’m using it. I have about 50k rows in one table and 7 fields
indexed (with only 4 of them ever being populated with data).

I currently have ferret 0.9.3. I’ve tried upgrading to the latest, but
haven’t been able to get a new aaf (see post about not being able to
install latest aaf) to accompany it so I’m kinda stuck there until I can
get a new aaf.

Anyway, if anybody has any ideas or expectations that should be set with
a shared hosting plan at dreamhost, I’m all ears.

Thanks
-Mark

anrake o. wrote:

I think I figured out this problem. All you had to do was add this line
to the top of environment.rb

ENV[‘GEM_PATH’] = ‘/home/USERNAME/.gems’ + ‘:/usr/lib/ruby/gems/1.8’

The DH wiki says to put the following, but it didn’t seem to work.

ENV[‘GEM_PATH’] = File.expand_path(’~/.gems’) +
‘:/usr/lib/ruby/gems/1.8’

I actually created a new test project in dev. mode and saw an error
some where like “couldn’t expand ~” or “unknown comand expand_path” or
something like that and just put in the absolute path as above on a
whim. Then it worked fine.

anrake wrote:

Hi, I am experiencing exactly the same phenomenon.
Everything works find on my powerbook, but not on DH. I changed
bash_profile to add my local .gems directory and installed ferret with
no apparent problems. I added a line to environment.rb as instructed in
the wiki but still get the same problems when I try to deploy my new
site (via Capistrano). Likewise I think dispatch.fcgi is not starting.

Any ideas?

Chris L. wrote:

Does anybody have experience with running ferret on dreamhost ?

My app is running ok until I install the acts_as_ferret plugin, at which
point I get “Rails application failed to start properly” errors. I’ve
used script/console to confirm that I can require ‘ferret’ and make a
new Index object . Everything appears to be ok in that respect.
Unfortunately there is nothing logged in these circumstances, except :

[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI: comm
with (dynamic) server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi” aborted:
(first read) idle timeout (120 sec)
[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI:
incomplete headers (0 bytes) received from server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi”

in the “apache” type logs that dreamhost gives me . Through trial and
error I am fairly sure it is ferret that is causing this, as when I
remove the plugin the site works ok.

I am using ferret 0.9.5 . As far as I can see dispatch.fcgi is not
starting.

Would appreciate any comments,

Chris

Chris L. wrote:

Does anybody have experience with running ferret on dreamhost ?

My app is running ok until I install the acts_as_ferret plugin, at which
point I get “Rails application failed to start properly” errors. I’ve
used script/console to confirm that I can require ‘ferret’ and make a
new Index object . Everything appears to be ok in that respect.
Unfortunately there is nothing logged in these circumstances, except :

[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI: comm
with (dynamic) server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi” aborted:
(first read) idle timeout (120 sec)
[Wed Aug 16 07:10:23 2006] [error] [client 152.78.115.107] FastCGI:
incomplete headers (0 bytes) received from server
“/home/c_lowis/residence-review.com/public/dispatch.fcgi”

in the “apache” type logs that dreamhost gives me . Through trial and
error I am fairly sure it is ferret that is causing this, as when I
remove the plugin the site works ok.

I am using ferret 0.9.5 . As far as I can see dispatch.fcgi is not
starting.

Would appreciate any comments,

Chris

What made the FCGI work for me was:

  • Creating the development database
  • Re-commenting out the RAILS_ENV line in environment.rb

Although, I was thinking that this would make it a ‘development’ env,
yet, to my astonismed, it was the production that kicked in.

I haven’t had the time to isolate this, but, I finally got it to work.
Good Luck.

  • Tamer Salama

Chris L. wrote:

comm

I am using ferret 0.9.5 . As far as I can see dispatch.fcgi is not
starting.

I’m not sure if this applies to your situation but I got this
particular error message whenever Rails (i.e. dispatch.fcgi) returned
a response starting with a whitespace character. Especially AJAX
calls to actions that do a ‘render :partial’ are prone to this error.
Maybe it’s actually the acts_as_ferret plugin that causes fcgi to
crash but I thought I better mention it.

You might also want to consider Mongrel as an alternative to FCGI. I
switched my apps a month ago and I’m really happy with it. Dealing
with the peculiarities of FCGI can be very frustrating. At least it’s
easier with Mongrel to track down errors.

Cheers,
Andy

Thank’s to all above for the suggestions, hopefully these will also help
someone with the same problem. I notice now that dreamhost has the
ferret gem pre-installed, so this might also help.

You might also want to consider Mongrel as an alternative to FCGI. I
switched my apps a month ago and I’m really happy with it. Dealing
with the peculiarities of FCGI can be very frustrating. At least it’s
easier with Mongrel to track down errors.

I’d love to ! It’s very nice to work with it on my development machine.
At the moment dreamhost doesn’t support mongrel, although dreamhost
customers can vote for Mongrel support here :

https://panel.dreamhost.com/index.cgi?tree=home.sugg&category=Software%20Installations&search=mongrel

Thank you all again,

Chris

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs