CGI and FastCGI problems

I can’t my rails app to work with cgi or fastcgi.

My app works using webrick. I’ve even hard-coded development mode in
environment.rb in order to get most descriptive messages, but the best I
get is the following in the apache2 errorlog:
[Thu Dec 15 10:38:04 2005] [error] [client x.x.x.x] FastCGI: incomplete
headers (35 bytes) received from server
“/path/to/railsapp/public/dispatch.fcgi”

my development.log file is empty.
my fastcgi-crashlog shows starting and terminated gracefully.

running dispatch.cgi or dispatch.fcgi via “ruby ./dispatch.cgi” returns
“500: Internal Server Error”

How can I fix this or at least get a more descriptive error message?

Thanks,
Jason

Jason E. wrote:

my fastcgi-crashlog shows starting and terminated gracefully.

running dispatch.cgi or dispatch.fcgi via “ruby ./dispatch.cgi”
returns “500: Internal Server Error”

How can I fix this or at least get a more descriptive error message?

I got it working on my own.

Things started working after I deleted all of the session files lie this
“rm -f /tmp/ruby_sess.*”

Jaosn

We’ve also had this problem and used this solution. However no one here
has (so far) been able to say what the problem actually is and how to
cure it long term.

Anyone?

Check the permissions on your ./tmp/session folder. If your running uder
suexec they will have to be something like 01777.

Rick wrote:

We’ve also had this problem and used this solution. However no one here
has (so far) been able to say what the problem actually is and how to
cure it long term.

Anyone?

On Friday 16 December 2005 20:22, Rick wrote:

We’ve also had this problem and used this solution. However no one here
has (so far) been able to say what the problem actually is and how to
cure it long term.

Anyone?

Had been bitten too by this problem for 2 different causes:

  1. too many sessions in /tmp dir. Found a solution in the “Ruby on
    Rails”
    book, which is to have cron issuing the following command from time to
    time:

find /tmp/ -name ‘ruby_sess*’ -ctime +12h -delete

  1. much more fun with change in the application: the objects kept in the
    session file could not be ‘marshaled’ back as their base class has had
    some
    changes. Solution: be sure that the browser is killed “for good”, do not
    try
    to reuse an existing cookie and make a fresh login in the application
    after
    each change.

Francois