This project is archived and is in readonly mode.
2.3.3 fcgi problem
-
Joshua White
I found a workaround, it took me installing rails local gems, then I had to modify the file...
rack-1.0.0/lib/rack/handler/fastcgi.rb
And comment out the alias line, line 7alias _rack_read_without_buffer read
Then kill my fcgi process and reload.
.............. what does this line mean? ...?
I also realized the error that truly describes the problem is this ... The error above comes after this error, but the fcgi process doesn't kill so thereafter it gives the above error because the Rack::Handler::FastCGI breaks down.
[22/Jul/2009:16:18:36 :: 28096] starting [22/Jul/2009:16:18:36 :: 28096] Dispatcher failed to catch: undefined method
read' for classFCGI::Stream' (NameError) /home1/jibwacom/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/handler/fastcgi.rb:7 /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:103:inprocess_request' /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:153:inwith_signal_handler' /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:101:inprocess_request' /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:78:inprocess_each_request' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:117:insession' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:104:ineach_request' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:36:ineach' /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:77:inprocess_each_request' /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:76:incatch' /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:76:inprocess_each_request' /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:51:inprocess!' /home1/jibwacom/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:23:inprocess!' dispatch.fcgi:24 -
Nathan Reckart
My apps died on Bluehost as well, with the same error as above.
I agree, there is a bug in the rack 1.0.0 gem; however, instead of commenting out the line where the error occurs, I believe the line needs to be moved to just after the 'read' method definition. It's trying to alias a method before it's defined.
So instead of:
class FCGI::Stream
alias _rack_read_without_buffer readdef read(n, buffer=nil)
buf = _rack_read_without_buffer n buffer.replace(buf.to_s) if buffer bufend
endIt should be:
class FCGI::Stream
def read(n, buffer=nil)buf = _rack_read_without_buffer n buffer.replace(buf.to_s) if buffer bufend
alias _rack_read_without_buffer read end
Once I installed the gem locally, modified it, and told my apps to use the local gem instead of the global system gem, my apps work fine again.
-
Joshua White
I did the same thing on 4 of my rails sites and they all seem fine. Does mean we need to submit a patch?
-
Nathan Reckart
I sent a message to the Rack mailing list since this is a Rack issue.
-
Ron Barry
I've tried just about everything I can find on this issue:
- Editing ruby/gems/gems/rack-1.0.0/lib/rack/handler/fastcgi.rb to comment out the read alias, moving the read alias to after the read def.
- Generating new rails apps with -D and copying their dispatchers (which turned out to be identical to the ones I had) into my existing app.
- Every permutation of .htaccess I can find referred to by bluehost.
The closest I've come, after seeing the Dispatcher failed to catch: undefined method
read' for classFCGI::Stream' error, was when I switched from development to production. I don't know if the error I'm getting is a step forward or backward, but "require 'zip/zipfilesystem'" is causing fastcgi to puke:......:in
gem_original_require': no such file to load -- zip/zipfilesystem (MissingSourceFile)I have long since installed rubyzip in my local gems folder and I've checked that the permissions are open.
I don't know if my issues are related or not, but I have the same code running on a different bluehost domain (still on 2.2.2) that is still working perfectly. After three hours of screwing around with this, I'm pretty annoyed.
-
nuttao
I think it's problem of rails 2.3.3 and fcgi or other server's configuration with the last rails version.
I don't have the recommended solutions for rails 2.3.3 on bluehost but if your app doesn't need to use rails 2.3.3. I have the easy solutionsconcepts
- set your bluehost domain to be able to use local gem that you want to install. - and install gems that you want (my case is rails 2.2.2) - and config your app to use that gems in environtment.rbby follow this steps : http://sink.thinnnk.com/2008/11/30/how-do-i-install-my-own-gems
This solutions doesn't good for only this case but, it's make me can have 'my gems' and not to worry about bluehost changes with rails.
-
Nathan Reckart
I notified Bluehost about this issue. They replied and pointed me at
the this blog post.It basically does the same thing as I mention in my previous message
above. This appears to be their official method for fixing the error. -
Nathan Reckart
Ok, well my previous message didn't work out so well. Let's try again.
I notified Bluehost about this issue. They replied and pointed me at the the following URL:
http://www.bluehosttricks.com/2009/07/23/bluehost-hostmonster-and-f...
It basically does the same thing as I mention in my previous message above. This appears to be their official method for fixing the error.
-
Michael Koziarski
- Tag changed from 2.3.3, crash, fcgi to 2.3.3, bugmash, crash, fcgi
-
Rizwan Reza
- State changed from new to stale
- Tag changed from 2.3.3, bugmash, crash, fcgi to 2.3.3, crash, fcgi
Please update the ticket if this isn't solved yet.