I was hoping that someone can help me with this, which have been driving me nuts -- I have had my mongrel cluster dying daily. And yes, I have gone through the check list of possible causes: I don''t do log rotating I use active_record for session storage I don''t use SQLite and Berkeley DB The MySQL timeout is set to 3600 I am using only 10% of the memory. I am using RedHat Enterprise Linux 5, Apache 2.2, Rails 1.2.3, Ruby 1.8.6, and Mongrel 1.0.1. My DB is MySQL (which, per our institutional policy, must be on a central MySQL server). Maybe I need to install the MySQL gem and not use the MySQL driver that came with rails? Can I install the MySQL gem if my MySQL db is on a different server? By the way, here is what the log says when the cluster died: Mongrel timed out this thread: shutdown /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:675:in `write'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:532:in `write'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:506:in `command'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:238:in `close'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:236:in `disconnect!'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:231:in `reconnect!'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract_adapter.rb:93:in `verify!'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:109:in `verify_active_connections!'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:108:in `each_value'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:108:in `verify_active_connections!'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:111:in `prepare_application'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:39:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /usr/local/bin/mongrel_rails:16:in `load'' /usr/local/bin/mongrel_rails:16 Thanks a lot!
Hey Lei - we had a dying Mongrel too. We fixed it by doing the list you posted, plus our Senior Dev swapped out the MySQL libraries (drivers?) with the MySQL C library(drivers). Since then we have been all good. -adam O Lei Wang wrote:> I was hoping that someone can help me with this, which have been driving > me nuts -- I have had my mongrel cluster dying daily. And yes, I have > gone through the check list of possible causes: > I don''t do log rotating > I use active_record for session storage > I don''t use SQLite and Berkeley DB > The MySQL timeout is set to 3600 > I am using only 10% of the memory. > > I am using RedHat Enterprise Linux 5, Apache 2.2, Rails 1.2.3, Ruby > 1.8.6, and Mongrel 1.0.1. > My DB is MySQL (which, per our institutional policy, must be on a > central MySQL server). Maybe I need to install the MySQL gem and not use > the MySQL driver that came with rails? Can I install the MySQL gem if my > MySQL db is on a different server? > > By the way, here is what the log says when the cluster died: > > Mongrel timed out this thread: shutdown > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:675:in > `write'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:532:in > `write'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:506:in > `command'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:238:in > `close'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:236:in > `disconnect!'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:231:in > `reconnect!'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract_adapter.rb:93:in > `verify!'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:109:in > `verify_active_connections!'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:108:in > `each_value'' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:108:in > `verify_active_connections!'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:111:in > `prepare_application'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:39:in > `dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in > `process'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in > `synchronize'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in > `process'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in > `process_client'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in > `process_client'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in > `initialize'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in > `initialize'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in > `each'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in > `run'' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 > /usr/local/bin/mongrel_rails:16:in `load'' > /usr/local/bin/mongrel_rails:16 > > Thanks a lot! > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
On 7/18/07, Lei Wang <lei.wang at yale.edu> wrote:> I am using RedHat Enterprise Linux 5, Apache 2.2, Rails 1.2.3, Ruby > 1.8.6, and Mongrel 1.0.1. > My DB is MySQL (which, per our institutional policy, must be on a > central MySQL server). Maybe I need to install the MySQL gem and not use > the MySQL driver that came with rails? Can I install the MySQL gem if my > MySQL db is on a different server? >Ohh, you SHOULD. The driver shipped with rails is a Pure Ruby adapter, that sometimes "choke". The native mysql adapter (mysql gem) is the way to go. Also 10-15% performance boost ;-) Hope that''s help you. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi
On Jul 18, 2007, at 12:17 , Lei Wang wrote:> I was hoping that someone can help me with this, which have been > driving > me nuts -- I have had my mongrel cluster dying daily. And yes, I have > gone through the check list of possible causes: > I don''t do log rotating > I use active_record for session storage > I don''t use SQLite and Berkeley DB > The MySQL timeout is set to 3600 > I am using only 10% of the memory. > > I am using RedHat Enterprise Linux 5, Apache 2.2, Rails 1.2.3, Ruby > 1.8.6, and Mongrel 1.0.1. > My DB is MySQL (which, per our institutional policy, must be on a > central MySQL server). Maybe I need to install the MySQL gem and > not use > the MySQL driver that came with rails? Can I install the MySQL gem > if my > MySQL db is on a different server? > <snip>Most definitely install the mysql gem. -- Wayne E. Seguin Sr. Systems Architect & Systems Admin wayneseguin at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070718/1d361ea3/attachment-0001.html
Thank you all! Now let me figure out how to install the gem... I have tried many times but could not successfully install it. Does this have to do with the fact that my MySQL DB is running on a different server? Hmm. Anyway I will try again and see if this fixes the problem.
On 7/18/07, Lei Wang <lei.wang at yale.edu> wrote:> Thank you all! Now let me figure out how to install the gem... I have > tried many times but could not successfully install it. Does this have > to do with the fact that my MySQL DB is running on a different server? > Hmm. Anyway I will try again and see if this fixes the problem.You may need the mysql-dev packages or anything that contains header information so mysql extension could be successfully be compiled :P I''ll suggest you do a google search for "insert your distro version here" and ''mysql gem rails compile'' :-D Regards, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi
Hi all I have encountered this problem on oracle too. Mongrels die overnight. I have temp. fixed it by putting a small script to keep pinging it every 15 mins Piyush On 7/18/07, Luis Lavena <luislavena at gmail.com> wrote:> > On 7/18/07, Lei Wang <lei.wang at yale.edu> wrote: > > Thank you all! Now let me figure out how to install the gem... I have > > tried many times but could not successfully install it. Does this have > > to do with the fact that my MySQL DB is running on a different server? > > Hmm. Anyway I will try again and see if this fixes the problem. > > You may need the mysql-dev packages or anything that contains header > information so mysql extension could be successfully be compiled :P > > I''ll suggest you do a google search for "insert your distro version > here" and ''mysql gem rails compile'' :-D > > Regards, > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070719/60516510/attachment.html