On Monday, December 23, 2013 2:48:31 AM UTC-6, Shay Lavi wrote: > > Hi, > I'm running puppet on Centos VM server without puppet agent (and no > puppetmaster) just by using puppet apply. > Lately i'm getting error while try to run puppet: "Cannot allocate memory > - fork(2)" > By looking at the server memory consumption I can see the the ruby is > using a lot of memory until no more memory is available. > I tried to overcome this by: > 1) Increasing memory > 2) Reinstall puppet > > These solutions didn't last long and the error returned. > Any idea how to fix this? > > I'm using *puppet 3.3.2* and *ruby 1.9.2* > >
You could try running the agent periodically via a scheduler (such as cron) instead of running it in daemon mode. You would want to pass at least the --no-daemonize flag to the agent in that context. That should help if the problem involves Puppet / Ruby accumulating unneeded garbage from run to run. You may also want to look at what you are trying to manage. Does it include recursive File resources spanning large directory trees? Does it include very large Files? Does it include extremely large total numbers of resources? Such things could inflate Puppet's memory use, and there are alternatives to many of them. John -- 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/378d2e97-e973-408a-a6d2-75ef72c6f5d2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.