James Michael-Hill
2006-Mar-13 16:13 UTC
[Rails] Excessive Errno::EBADF with dispatch.fcgi
I''m running Ruby on Rails via FastCGI in an Apache environment, and I get the following error, a lot. (from log/fastcgi.crash.log) [13/Mar/2006:15:52:51 :: 94704] Dispatcher failed to catch: Bad file descriptor (Errno::EBADF) /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:38:in `close'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:38:in `each'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `process!'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!'' "fastcgi.crash.log" 2204L, 143144C /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:113:in `accept'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:113:in `session'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:104:in `each_request'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:36:in `each'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `process!'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!'' /usr/local/apache/htdocs/utctelecom2006/dispatch.fcgi:24 almost killed by this error By a lot, I mean about every five seconds, which makes for log files getting into the 100+meg size pretty swiftly. The site appears to be working fine. My best guess is that since I''m hosting stuff out of /www/railsapps/<myapp> where /www is a symlink to usr/local/apache and I in turn symlink /www/railsapps/<myapp>/public to a directory in htdocs - there''s a lot of symlinks. I''ve seen file_column get a bit confused with this before, so my guess is that the same thing is happening to fcgi. I don''t see any 404 errors in my log files, just notifications that the fastcgi process exited. I''m thinking I might just symlink fastcgi.crash.log to /dev/null, but I''d prefer getting to the bottom of it or even just catching EBADF in dispatch.fcgi. Any ideas on the list? --James -- Posted via http://www.ruby-forum.com/.
Met similar error (Bad file descriptor, crashing repeatedly and very fast) when I first setup my lighttpd + fcgi. Solved it by setting up my RAILS_ENV properly - I''d meant to use "production". My "development" environment didn''t have a proper database connection configured... am guessing that''s why it keeps crashing. Hope that helps. On 3/14/06, James Michael-Hill <james.michael-hill@utc.org> wrote:> > I''m running Ruby on Rails via FastCGI in an Apache environment, and I > get the following error, a lot. > > (from log/fastcgi.crash.log) > > [13/Mar/2006:15:52:51 :: 94704] Dispatcher failed to catch: Bad file > descriptor (Errno::EBADF) > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:38:in `close'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:38:in `each'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in > `process!'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in > `process!'' > "fastcgi.crash.log" 2204L, 143144C > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:113:in `accept'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:113:in `session'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:104:in `each_request'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:36:in `each'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in > `process!'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in > `process!'' > /usr/local/apache/htdocs/utctelecom2006/dispatch.fcgi:24 > almost killed by this error > > > By a lot, I mean about every five seconds, which makes for log files > getting into the 100+meg size pretty swiftly. The site appears to be > working fine. My best guess is that since I''m hosting stuff out of > /www/railsapps/<myapp> where /www is a symlink to usr/local/apache and I > in turn symlink /www/railsapps/<myapp>/public to a directory in htdocs - > there''s a lot of symlinks. I''ve seen file_column get a bit confused > with this before, so my guess is that the same thing is happening to > fcgi. I don''t see any 404 errors in my log files, just notifications > that the fastcgi process exited. > > I''m thinking I might just symlink fastcgi.crash.log to /dev/null, but > I''d prefer getting to the bottom of it or even just catching EBADF in > dispatch.fcgi. Any ideas on the list? > > --James > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060328/f7b7d1c8/attachment.html
James Michael-Hill
2006-Apr-03 14:07 UTC
[Rails] Re: Excessive Errno::EBADF with dispatch.fcgi
choonkeat wrote:> Met similar error (Bad file descriptor, crashing repeatedly and very > fast) > when I first setup my lighttpd + fcgi. > > Solved it by setting up my RAILS_ENV properly - I''d meant to use > "production". > My "development" environment didn''t have a proper database connection > configured... am guessing that''s why it keeps crashing. > > Hope that helps.Well, by all appearances it seems to be talking to the right database and working properly in all other areas, except for that error. My best guess is that it''s due to all of the symlinking I have going on, or some file I keep referencing that isn''t there. -- Posted via http://www.ruby-forum.com/.