Forum: Ruby on Rails FastCgi issue

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.
3320715fa6264e6309503d5bd089fad2?d=identicon&s=25 Mufaddal Khumri (mkhumri)
on 2006-01-18 22:53
(Received via mailing list)
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
D90ef6808433e63203e15a5c2dadb0bb?d=identicon&s=25 Ben Reubenstien (Guest)
on 2006-01-18 23:17
(Received via mailing list)
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.
3320715fa6264e6309503d5bd089fad2?d=identicon&s=25 Mufaddal Khumri (mkhumri)
on 2006-01-18 23:23
(Received via mailing list)
Our setup is: RedHat Enterprise + Apache + FastCGI. Any ideas?
Ccaa63b09f5168501b194266b9a1e7cc?d=identicon&s=25 Scott Willson (Guest)
on 2006-01-19 04:01
(Received via mailing list)
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
3320715fa6264e6309503d5bd089fad2?d=identicon&s=25 Mufaddal Khumri (mkhumri)
on 2006-01-19 17:54
(Received via mailing list)
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,
D90ef6808433e63203e15a5c2dadb0bb?d=identicon&s=25 Ben Reubenstien (Guest)
on 2006-01-19 18:06
(Received via mailing list)
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
18d8b0c948dd7b3d39c9667cfd4e817c?d=identicon&s=25 Andrew Stone (Guest)
on 2006-01-19 20:01
(Received via mailing list)
On 1/19/06, Ben Reubenstien <benr@x-cr.com> 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).
132a94ca65959bda6c74fae54bff2425?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-01-19 22:05
(Received via mailing list)
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 Khumri wrote:

> should run in order to make our rails app deployment ready and that
>>
>>> Hi,
>>> htdocs/ot/ public/dispatch.fcgi"
>> _______________________________________________
>> Rails mailing list
>> Rails@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
ezra@yakima-herald.com
This topic is locked and can not be replied to.