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
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. On 1/18/06, Mufaddal Khumri <mkhumri@allegromedical.com> wrote:> > 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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Ben Reubenstein benr@x-cr.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060118/dbf6fe3a/attachment.html
Our setup is: RedHat Enterprise + Apache + FastCGI. Any ideas? Ben Reubenstien wrote:> 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. > > On 1/18/06, *Mufaddal Khumri* <mkhumri@allegromedical.com > <mailto:mkhumri@allegromedical.com>> wrote: > > 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 > <http://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 > <http://77.123.19.115>] FastCGI: > incomplete headers (0 bytes) received from server > "/var/htdocs/ot/public/dispatch.fcgi" > > Any help is appreciated, > > Thanks > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org <mailto:Rails@lists.rubyonrails.org> > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Ben Reubenstein > benr@x-cr.com <mailto:benr@x-cr.com> > >------------------------------------------------------------------------ > >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
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 On Jan 18, 2006, at 1:15 PM, Mufaddal Khumri wrote:> 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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
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, Scott Willson wrote:> 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 > > > On Jan 18, 2006, at 1:15 PM, Mufaddal Khumri wrote: > >> 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 >> _______________________________________________ >> 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
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 On 1/19/06, Mufaddal Khumri <mkhumri@allegromedical.com> wrote:> > 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, > > Scott Willson wrote: > > > 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 > > > > > > On Jan 18, 2006, at 1:15 PM, Mufaddal Khumri wrote: > > > >> 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 > >> _______________________________________________ > >> 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 > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Ben Reubenstein benr@x-cr.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/24c7a864/attachment-0001.html
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). -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/3f5199fb/attachment.html
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:> 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, > > Scott Willson wrote: > >> 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 >> >> >> On Jan 18, 2006, at 1:15 PM, Mufaddal Khumri wrote: >> >>> 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 >>> _______________________________________________ >>> 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 > > > _______________________________________________ > 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