Forum: Ruby on Rails CGI and FastCGI problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jason E. (Guest)
on 2005-12-15 18:48
(Received via mailing list)
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. (Guest)
on 2005-12-15 21:58
(Received via mailing list)
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
Rick (Guest)
on 2005-12-16 15:22
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?
Francois GORET (Guest)
on 2005-12-16 15:44
(Received via mailing list)
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

2) 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
JB (Guest)
on 2006-05-21 02:19
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?
This topic is locked and can not be replied to.