Recently I started noticing that after running for a while puppetmaster would freeze after a client called `freshness` which would eventually result in the client getting a timeout and the client dyeing. I tracked the freeze down to the call to ActiveRecord::Base.verify_active_connections! in rails.rb on line 26. After scouring the nets I finally found: http://groups.google.com/group/activemessaging-discuss/browse_thread/thread/7cbbcd761fcb0fd8 which led me to the mongrel faq: http://mongrel.rubyforge.org/faq.html specifically the questions "Mongrel stops working if it''s left alone for a long time.", and "Why do I get MySQL ''lost connection to database'' errors?". Setting "ActiveRecord::Base.verification_timeout = 14400" did not have any benifit (even tried going as low as 300). However if I''m understanding correctly this appears to tell verify_active_connections that it only has to check a connection for timeouts once every so many seconds. It might be useful to be able to configure this in the config file as an optimization. Though I don''t have enough load to really be able to say how much of an optimization this will provide, if any. This seems default to 0 in the code so it shouldn''t hurt as long as it is less than your mysql timeout. The second entry indicated the default mysql connector has issues and the mysql connector gem should be installed. Doing this appears to have resolved the issue and I have been running smoothly again for the past 24 hours. Thanks Brian
Thanks Brian, would you mind putting this on the wiki page for storeconfigs? I vaguely remember having this issue myself with a new system, but resolved it by accident when I was installing the gem for other reasons. -Blake On 9/21/07, Brian Finney <y0gi636@gmail.com> wrote:> > Recently I started noticing that after running for a while > puppetmaster would freeze after a client called `freshness` which > would eventually result in the client getting a timeout and the client > dyeing. I tracked the freeze down to the call to > ActiveRecord::Base.verify_active_connections! in rails.rb on line 26. > After scouring the nets I finally found: > > > http://groups.google.com/group/activemessaging-discuss/browse_thread/thread/7cbbcd761fcb0fd8 > > which led me to the mongrel faq: > > http://mongrel.rubyforge.org/faq.html > > specifically the questions "Mongrel stops working if it''s left alone > for a long time.", and "Why do I get MySQL ''lost connection to > database'' errors?". > > Setting "ActiveRecord::Base.verification_timeout = 14400" did not have > any benifit (even tried going as low as 300). However if I''m > understanding correctly this appears to tell verify_active_connections > that it only has to check a connection for timeouts once every so many > seconds. It might be useful to be able to configure this in the > config file as an optimization. Though I don''t have enough load to > really be able to say how much of an optimization this will provide, > if any. This seems default to 0 in the code so it shouldn''t hurt as > long as it is less than your mysql timeout. > > The second entry indicated the default mysql connector has issues and > the mysql connector gem should be installed. Doing this appears to > have resolved the issue and I have been running smoothly again for the > past 24 hours. > > Thanks > Brian > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
I''ve added the requirement for the mysql gem to http://reductivelabs.com/trac/puppet/wiki/VirtualResources I seem to remember there being another page that has more information about storeconfigs but I just can''t seem to find it. If I can get a link to the page I''d be happy to add the information (and I''ll tag it storeconfigs). Thanks Brian On 9/22/07, Blake B <shadoi@gmail.com> wrote:> Thanks Brian, would you mind putting this on the wiki page for storeconfigs? > I vaguely remember having this issue myself with a new system, but resolved > it by accident when I was installing the gem for other reasons. > > -Blake > > > On 9/21/07, Brian Finney <y0gi636@gmail.com> wrote: > > > > Recently I started noticing that after running for a while > > puppetmaster would freeze after a client called `freshness` which > > would eventually result in the client getting a timeout and the client > > dyeing. I tracked the freeze down to the call to > > ActiveRecord::Base.verify_active_connections! in rails.rb on line 26. > > After scouring the nets I finally found: > > > > > http://groups.google.com/group/activemessaging-discuss/browse_thread/thread/7cbbcd761fcb0fd8 > > > > which led me to the mongrel faq: > > > > http://mongrel.rubyforge.org/faq.html > > > > specifically the questions "Mongrel stops working if it''s left alone > > for a long time.", and "Why do I get MySQL ''lost connection to > > database'' errors?". > > > > Setting "ActiveRecord:: Base.verification_timeout = 14400" did not have > > any benifit (even tried going as low as 300). However if I''m > > understanding correctly this appears to tell verify_active_connections > > that it only has to check a connection for timeouts once every so many > > seconds. It might be useful to be able to configure this in the > > config file as an optimization. Though I don''t have enough load to > > really be able to say how much of an optimization this will provide, > > if any. This seems default to 0 in the code so it shouldn''t hurt as > > long as it is less than your mysql timeout. > > > > The second entry indicated the default mysql connector has issues and > > the mysql connector gem should be installed. Doing this appears to > > have resolved the issue and I have been running smoothly again for the > > past 24 hours. > > > > Thanks > > Brian > > _______________________________________________ > > Puppet-users mailing list > > Puppet-users@madstop.com > > https://mail.madstop.com/mailman/listinfo/puppet-users > > > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users > >
Apparently Analagous Threads
- Application stops working over night: (Errno::EPIPE (Broken pipe)) is the error
- Preventing Mongrel/Mysql Errno::EPIPE exceptions
- Rails 2.2.2 - Mysql::Error: MySQL server has gone away
- Anyone using storeconfigs with a DB other than sqlite?
- Client vs server storeconfigs