Issue #18211 has been updated by David Mesler.
I've added some debugging messages to run_event_loop and figured out what was going on. I'm going to reference line numbers in https://github.com/puppetlabs/puppet/blob/master/lib/puppet/daemon.rb to make it easier on me to explain. I found that occasionally the "if" statement on line 180 was failing because the value of "now" was one second behind "next_reparse". I believe this is because line 168 uses "to_i" when it should use "ceil". I'm deploying a patched version of puppet with this change to my servers now. But I think a bigger issue is line 175 where next_event is set to the current time plus one hour. That's a pretty arbitrary and unpleasant value. Why not set next_event to the lower vale of :runinterval or :filetimeout? The way it is now, if line 180 fails, you're stuck with an hour long wait even though your :runinterval may be far less. Also, line 197 is backwards. It should be "next_agent_run += new_run_interval - agent_run_interval". ---------------------------------------- Bug #18211: puppet agent sleeping well past runinterval https://projects.puppetlabs.com/issues/18211#change-79271 Author: David Mesler Status: Unreviewed Priority: Normal Assignee: Category: Target version: Affected Puppet version: 3.0.1 Keywords: Branch: We've recently upgraded our infrastructure from puppet 2.6.9 to 3.0.1. After the upgrade we've noticed many of our hosts are sleeping well past the 900 second runinterval they're configured for. (We get Nagios alerts when puppet hasn't run in a while.) About once a day (some more, some less, some not all, and all assorted hosts with very different manifests) the puppet agent will sleep for about an hour between runs. Running strace on a sleeping agent simply shows a long select call with no fd's. select(1, [], [], [], {1259, 476000} <unfinished ...> Once that select is done counting down the agent re-reads puppet.conf and begins a catalog run. This occurs on a mix of Centos 5.8 and 6.3 hosts. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
