How to profile a puppet agent run using passenger.
I'm trying to run Puppet profiler during a catalog run, but I can't seem to get this to work when using mod_passenger. I have set 'debug' to
true and 'profile' to
true in the Puppet config (
/etc/puppet/puppet.conf) file, and restarted Apache after the change. Yet, when I run my
puppet agent run, I do not see the profile tags in the log as I would expect.
If I go to the master, and print the 'profile' variable, it returns true so I suspect the '--debug' flag isn't getting set correctly by Passenger(??).
[vagrant@puppet ~]$ sudo puppet config print --section master profile true
Even though, I have the settings correct (I think), it's not working as I expected it to. Has anyone been able to run the profiler when using passenger?
If I start the puppet master (
sudo puppet master --debug --no-daemonize), I just can't get the
PROFILE messages when in passenger. The page Tune Puppet for Performance with Profiler
didn't seem to help much in this scenario.
After playing around with config.ru, I found that if I add
ARGV << "--logdest" << "console" the profile log gets sent to the Apache error log (
/var/log/httpd/error_log). I suspect that systemd/journald (from CentOS) is hiding the messages from the profile. This also doesn't answer why setting 'logdest' to a file(
ARGV << "--logdest" << "/tmp/puppet.run.log") doesn't work either.