puppetlabs/puppet — pull request #382 by masterzen (2012-01-21 22:47:59+00:00)
Title: #11044 - agent should do catalog run in a child process

The current best practice among Puppet users is to run the puppet agent out of cron with —onetime. The rationale is that the puppet agent is a memory hog during a run, but due to the way the ruby interpreter works this memory can never be returned to the OS between runs. Running on cron makes sure puppet doesn’t hold this memory for more than the run.

A simple solution to this issue is to fork into a child process and do the catalog run there.
This process would exit at the end of the catalog execution, thus freeing the memory used during the run.

This is a new pull request of the code rebased to master.
This supersedes pull request #234.