Hi all, I''ve been looking at using stored configs to generate my Nagios configs. I followed this guide[1] to set up the remote MySQL database for this purpose, like this: [puppetmasterd] storeconfigs = true dbadapter = mysql dbuser = puppet dbpassword = password dbserver = mydb.bris.ac.uk #dbsocket = /var/run/mysqld/mysqld.sock Trouble is, each time a node checks into puppet, a new db handle is opened without the old one being closed. With a few nodes, it doesn''t take long before there are tens or hundreds of handles, and the db server won''t accept any more. This is Bad, since many other things rely on that database, and when it stops accepting more connections, things break. So, does anyone know how I can make puppet open just one connection and keep it persistently? Thanks, Jonathan [1] http://projects.puppetlabs.com/projects/puppet/wiki/Using_Stored_Configuration -- ---------------------------- Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services University of Bristol ---------------------------- -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Trouble is, each time a node checks into puppet, a new db handle is> opened without the old one being closed. With a few nodes, it doesn''t > take long before there are tens or hundreds of handles, and the db > server won''t accept any more.I''ve just run into this issue as well with the following db* configuration: dbadapter = mysql dbname = puppet dbuser = puppet dbpassword = password dbserver = localhost This is Bad, since many other things rely on that database, and when it> stops accepting more connections, things break. >In our case it ran up against the ulimit, not MySQL''s connection limit. Same result: 400 errors being returned to the client: nfo: Retrieving plugin err: /File[/var/lib/puppet/lib]: Failed to generate additional resources using ''eval_generate'': Error 400 on SERVER: Too many open files - /etc/puppet/modules err: /File[/var/lib/puppet/lib]: Could not evaluate: Error 400 on SERVER: Too many open files - /etc/puppet/modules Could not retrieve file metadata for puppet://puppet/plugins: Error 400 on SERVER: Too many open files - /etc/puppet/modules err: Could not retrieve catalog from remote server: Error 400 on SERVER: Can''t create UNIX socket (24) warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run For now, we''ve upped the ulimit -n but that''s obviously a temporary solution at best. Restarting the Puppet master when it hits the limit feels pretty broken. Suggestions? Other debug info I should include? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Sounds like you''re running the wrong version of the mysql rubygem. If memory serves, this was a known issue. -- Joe McDonagh AIM: YoosingYoonickz IRC: joe-mac on freenode L''ennui est contre-révolutionnaire -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thursday, February 10, 2011 at 11:20 AM, Joe McDonagh wrote: Sounds like you''re running the wrong version of the mysql rubygem. If> memory serves, this was a known issue. >We''re on 2.7.3 packaged by CentOS. http://projects.puppetlabs.com/issues/3238 seems to indicate the problem exists even with 2.8.1 (latest gem). -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.