Ask Your Question
2

cannot allocate memory - fork

asked 2013-11-14 17:30:30 -0500

mmrobins gravatar image

Using Puppet 3.1.0 when I run puppet apply I'm getting the following error:

Error: /Stage[main]/Vsftpd/Service[vsftpd]: Could not evaluate: Cannot allocate memory - fork(2)
Error: /Stage[main]/Graphite::Install/Package[whisper]: Could not evaluate: Cannot allocate memory -  /usr/bin/pip freeze 2>&1
Error: /Stage[main]/Myclass/Exec[myexec]/returns: change from notrun to 0 failed: Cannot allocate memory - fork(2)

I can run the commands outside puppet and don't get this problem.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2013-11-14 17:33:28 -0500

mmrobins gravatar image

Right after posting the question I realized I didn't have any swap and my newly created box:

 >free -m
             total       used       free     shared    buffers     cached
Mem:           491        444         46          0         13         88
-/+ buffers/cache:        342        148
Swap:            0          0          0

Here's a guide I used on Digital Ocean to add the swap partion, but it should apply pretty well for Ubuntu systems anywhere. After adding swap my "cannot allocate memory -fork" errors were gone.

edit flag offensive delete link more
0

answered 2015-07-06 23:07:35 -0500

Ishu gravatar image

Check First the memory by using command "df -H" on your server. If the memory is ok than reboot your system with "sudo su reboot" and it will work fine..

edit flag offensive delete link more
0

answered 2015-06-01 14:54:46 -0500

rglaue gravatar image

If you are experiencing this issue on the puppet master, use puppetserver.

Your puppet agents might be receiving an error message like: "Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node yoursystem.example.com: Cannot allocate memory - fork(2)"

A restart of "puppetmaster" fixes the issue temporarily. The issue is a known memory leak issue with ruby (See also: https://tickets.puppetlabs.com/browse/PUP-1169). The recommendation is to use "puppetserver". It is available from the puppetlabs-products repository.

Also see that the Rack and WEBrick daemon options for puppet master are deprecated: https://docs.puppetlabs.com/puppet/4.1/reference/deprecated_servers.html

See also Puppet Server: https://docs.puppetlabs.com/puppetserver/2.0/servicesmasterpuppetserver.html

Puppet Server is an application that runs on the Java Virtual Machine (JVM) and provides the same services as the classic Puppet master application.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-11-14 17:30:30 -0500

Seen: 7,360 times

Last updated: Jul 06 '15