# Radiant on dremhost - incomplete dispatch.fcgi headers?

**URL:** <https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498>\
**Category:** Radiant CMS\
**Created:** [February 22, 2007, 7:47pm UTC](https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498 "2007-02-22T19:47:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ol1barn3s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/9de053/32.png) [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Post date:** [February 22, 2007, 7:47pm UTC](https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498/1 "2007-02-22T19:47:35Z")

</div>

I have radiant installed over rubygems on dreamhost, and it works fine  
with webbrick, but not with apache, for some reason. I get nothing on  
the rails logs, and i get the following on apache’s error log:

[Thu Feb 22 10:39:12 2007] [error] FastCGI: comm with (dynamic) server  
“/home/ol1barn3s/parabolaproducoes.oliverbarnes.com/public/dispatch.fcgi”  
aborted: (first read) idle timeout (60 sec)  
[Thu Feb 22 10:39:12 2007] [error] FastCGI: incomplete headers (0  
bytes) received from server  
“/home/ol1barn3s/parabolaproducoes.oliverbarnes.com/public/dispatch.fcgi”

any ideas of what could be causing this? i’ve tripled-checked the  
recommendations on dreamhost’s wiki entry about running rails there,  
and I have a couple of other rails apps running fine there with the  
same configurations. I’ve even recreated the subdomain there and  
reinstalled radiant, but no luck with that either.

- Oliver

---

<div class="post-metadata">

**Author:** ![ol1barn3s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/9de053/32.png) [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Post date:** [February 22, 2007, 8:59pm UTC](https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498/2 "2007-02-22T20:59:52Z")

</div>

Do you see any other information in other log files?

As a test, try creating a fresh “empty” rails project.

Can you run

> > rails testproject  
> > on the dreamhost ssh command line

See if you can get an empty rails site running.

Then compare the dispatch.fcgi and environment.rb of the test project  
with the radiant you are trying to run.

Also try installing radiant as a full standalone app instead of using  
the gem.

---

<div class="post-metadata">

**Author:** ![ol1barn3s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/9de053/32.png) [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Post date:** [February 22, 2007, 10:25pm UTC](https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498/3 "2007-02-22T22:25:55Z")

</div>

Hi Jacob,

no, the other log files are empty, aside from the db bootstraping info.

## I do have a couple of other rails projects running on the same account, and I’ve compared both environment and dispatch files, nothing seems to be wrong… here’s my dispatch.fcgi:

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! nil, 50

and my environment.rb is the standard one installed with radiant, I  
just uncommented

ENV[‘RAILS\_ENV’] ||= ‘production’

on it.

this problem is mentioned in a lot places on the web, but the  
solutions given vary wildly - “force your GC to collect every 50  
requests”, “run on dev mode first then run on production”, “check  
permissions on /tmp and /log”… tried them all out.

There are threads mentioning hosting services (not just dreamhost)  
deliberately killing off dispatch.fcgi processes from certain accounts  
that have been “bad” with runaway processes. but thing is, the only  
rails app I run full time here is running ok, and it doesn’t have much  
traffic at all… I did send a support ticket asking whether that’s  
happening, so let’s see how it goes.

meanwhile, i’m going to try running it as a standalone app as you  
suggested

2007/2/22, Jacob B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![ol1barn3s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/9de053/32.png) [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Post date:** [February 22, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498/4 "2007-02-22T23:07:00Z")

</div>

dreamhost responded saying I ran against a memory limit for the user  
I’m running the app on. how i hit the limit with only development  
sites with no traffic and ruby processes only running for a fraction  
of the time, is a mistery to me. they suggested creating a new user  
and installing everything over again… sigh…

anyway, thanks for all the help jakob

2007/2/22, Oliver B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![ol1barn3s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/9de053/32.png) [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Post date:** [February 22, 2007, 11:39pm UTC](https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498/5 "2007-02-22T23:39:40Z")

</div>

Ohh, good to know that the memory limit is tied to the user account.

I’ll have to start creating new users for each new site I setup.

I did notice one time my radiant on dreamhost crapped out while I was  
doing a lot of intesive admin work. And it repeatedly failed to restart  
after that for about 15 minutes… And then eventually it was fine  
again without me doing anything.

I wonder if the memory limit is due to some extra startup logic or  
checking etc…

What’s the first page you hit after killing all the crapping out fcgis?  
This might make a difference. I’d think the best thing to do is hit a  
page that is already cached before hitting the admin.

---

<div class="post-metadata">

**Author:** ![ol1barn3s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/9de053/32.png) [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Post date:** [February 24, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498/6 "2007-02-24T23:22:35Z")

</div>

ok, now I’m able to see admin/pages/index and a few other pages, off  
and on. can’t see the assets page at all, though the tab is there.

weird thing is, I can’t see any of the dispatch processes, with  
neither users (main user and the new user I have set up for running  
radiant)

2007/2/24, Oliver B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![ol1barn3s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/9de053/32.png) [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Post date:** [February 24, 2007, 11:00pm UTC](https://www.ruby-forum.com/t/radiant-on-dremhost-incomplete-dispatch-fcgi-headers/86498/7 "2007-02-24T23:00:33Z")

</div>

usually I just hit whatever page I was working on before… going to  
try hitting a cached page first then.

so, I created a new user and installed everything again, this time  
from svn, while keeping the original mysql data. I see the cached site  
fine, and the login page for the admin as well. but when I login, I  
get an “Application Error (Apache)” error.

production.log has the following error when trying to render  
admin/page/index:

ActionView::TemplateError (The single-table inheritance mechanism  
failed to locate the subclass: ‘MailerPage’. This error is raised  
because the column ‘class\_name’ is reserved for storing the class in  
case of inheritance. Please rename this column if you didn’t intend it  
to be used for storing the inheritance class or overwrite  
Page.inheritance\_column to use another column for that information.)  
on line #44 of app/views/admin/page/\_node.rhtml:  
41: \<% level = level + 1 -%\>  
42: \<%  
43: if expanded  
44: page.children.each do |child|  
45: -%\>  
46: \<%= render\_node child, :level =\> level, :simple =\> simple -%\>  
47: \<%

```
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:1069:in

```

`instantiate_without_callbacks' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/callbacks.rb:204:in `instantiate’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/base.rb:427:in  
`find_by_sql' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:427:in `collect!’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/base.rb:427:in  
`find_by_sql' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:997:in `find\_every’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/base.rb:418:in  
`find' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:91:in `find’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/associations/association\_collection.rb:159:in  
`find_target' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:123:in `load\_target’  
#{RAILS\_ROOT}/vendor/rails/activerecord/lib/active\_record/associations/association\_proxy.rb:122:in  
`method_missing' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:98:in `method\_missing’  
#{RAILS\_ROOT}/app/views/admin/page/\_node.rhtml:44:in  
`_run_rhtml_47app47views47admin47page47_node46rhtml' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:326:in `send’  
#{RAILS\_ROOT}/vendor/rails/actionpack/lib/action\_view/base.rb:326:in  
`compile_and_render_template' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:301:in `render\_template’  
#{RAILS\_ROOT}/vendor/rails/actionpack/lib/action\_view/base.rb:260:in  
`render_file' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:275:in `render’  
#{RAILS\_ROOT}/vendor/rails/actionpack/lib/action\_view/partials.rb:59:in  
`render_partial' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:30:in `benchmark’  
#{RAILS\_ROOT}/vendor/rails/actionpack/lib/action\_view/partials.rb:58:in  
`render_partial' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:287:in `render’  
#{RAILS\_ROOT}/app/helpers/admin/page\_helper.rb:4:in `render_node' #{RAILS_ROOT}/app/views/admin/page/index.rhtml:14:in `\_run\_rhtml\_47app47views47admin47page47index46rhtml’  
(leaving out rails-specific dump)

apache’s log is empty.

I have re-installed the Mailer extension and run rake  
db:migrate:extensions… no output on the rake task though, should I  
scrap the extension tables and migrate again?

2007/2/22, Jacob B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
