Hey guys, Ok, so I've run into a situation where I setup some cron jobs via puppet that do chown's and chmod's to make sure the web directory is owned by the web server and that the contents have the right permissions.
The idea was to have the developer push their code via subversion and then have their changes automatically take place on the web every few minutes. I have another cron setup to do an svn up in the web root at regular intervals to do that. That's never given me any issue. But for some reason these cron jobs are spiking the load: Here they are: cron { "apache-chown": command => "/bin/chown -R apache:ftpgroup /var/www", user => 'root', hour => 0, minute => '*' } cron { "chmod-files": command => "/bin/find /var/www -type f -exec chmod -v 664 {} \;", user => 'root', hour => 0, minute => '*' } cron { "chmod-directories": command => "/bin/find /var/www -type d -exec chmod -v 775 {} \;", user => 'root', hour => 0, minute => '*' } That produces the following crons in my crontab: # Puppet Name: chmod-files * 0 * * * /bin/find /var/www -type f -exec chmod -v 664 {} \; # Puppet Name: apache-chown * 0 * * * /bin/chown -R apache:ftpgroup /var/www # Puppet Name: chmod-directories * 0 * * * /bin/find /var/www -type d -exec chmod -v 775 {} \; And what I've noticed is that the host can be fine for several days. And then become really slow to respond. And start throwing nagios alerts for load. And when you log into the box you can see load as high as 70-80% !!! Sometimes the host becomes so unresponsive due to the load that you'll have to reboot it just you can log into the host! And investigating with top and ps you find that it's THESE cron jobs that are causing the issue. What'll happen is that you will see like 30 or 40 or more chmod and chown jobs all running at the same time and spiking the load. And when you kill the jobs load returns to normal. If I read my cron correctly that should run only once every midnight. So two questions: am I reading this cron correctly ? That it is supposed to run once a day at midnight? And does anybody have any ideas at all why all these chown and chmod commands would keep stacking up and spiking the load?? Thanks, Tim -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOZy0e%3Dvc1hSimnVnFCrkg63B6qgay3gK6T-GRdRvjSdZteFMA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.