FastCgi issue


#1

Hi,

I know that Apache2 + fastcgi is sometimes difficult to setup, but I was
wondering if anyone has come across this error and if yes what did you
do to resolve it?

[Wed Jan 18 14:58:12 2006] [error] [client 77.123.19.115] FastCGI: comm
with server “/var/htdocs/ot/public/dispatch.fcgi” aborted: idle timeout
(120 sec)
[Wed Jan 18 14:58:12 2006] [error] [client 77.123.19.115] FastCGI:
incomplete headers (0 bytes) received from server
“/var/htdocs/ot/public/dispatch.fcgi”

Any help is appreciated,

Thanks


#2

What platform are you trying to get this working on? I was never able
to
get Apache 2 + FastCGI + Windows 2000 to work, and recieved the errors
you
show here. I was able to get Apache 2 + FastCGI + windows 2003 running.
My
production box however is Linux + Lighttpd + FastCGI.


#3

Our setup is: RedHat Enterprise + Apache + FastCGI. Any ideas?


#4

In my (very limited) experience with Apache2 + fastcgi, I’ve see this
when I’ve had a problem with my Rails configuration, not fastcgi.
Have you tried running dispatch.fcgi from directly? E.g.,

sudo -u www ./dispatch.fcgi

Not sure what user Apache runs under on your box. It’s wwwrun on Suse.

Scott


#5

That first line is very important and needs to be configured on a box by
box
basis. I place dispatch.fcgi.sample into version control, with no
dispatch.fcgi file so that every time I move the app to a new
environment I
am reminded to copy dispatch.fcgi.sample to dispatch.fcgi and adjust the
environment variable.

~ Ben


#6

On 1/19/06, Ben R. removed_email_address@domain.invalid wrote:

That first line is very important and needs to be configured on a box by
box basis. I place dispatch.fcgi.sample into version control, with no
dispatch.fcgi file so that every time I move the app to a new environment
I am reminded to copy dispatch.fcgi.sample to dispatch.fcgi and adjust the
environment variable.

~ Ben

It’s also good to do this (.sample technique) with config/database.yml
and
maybe even config/environment.rb (depending on your app).


#7

Yesterday afternoon we did manage to discover that in the
./dispatch.fcgi script the first line is:
#!/usr/bin/ruby1.8

On our production server, this is not the case. The app had been copied
over and we did not think of looking into the dispatch.fcgi and changing
that line to point to the correct path.

This made us think that is this something that is part of configuring a
rails app for production? Or is there some script we should run in order
to make our rails app deployment ready and that script would in turn
take care of setting such dependencies either by asking or discovery
whichever works.

Thanks,


#8

One way to get around this is by using a #! line that looks like this:

#!/usr/bin/env ruby

This is available on most modern *nix variants and all it does is
load the ruby interpreter that comes firs in your $PATH. this way the
same line will work on a box with ruby installed at /usr/bin/ruby or
another with /usr/local/bin/ruby or even /opt/local/bin/ruby. As long
as ruby is in the $PATH this one will work.

Cheers-
-Ezra

On Jan 19, 2006, at 8:15 AM, Mufaddal K. wrote:

should run in order to make our rails app deployment ready and that

Hi,
htdocs/ot/ public/dispatch.fcgi"


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

-Ezra Z.
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
removed_email_address@domain.invalid