OpenVZ Forum


Home » General » Support » Should i restart? Unable to fork: Cannot allocate memory
Should i restart? Unable to fork: Cannot allocate memory [message #50630] Wed, 25 September 2013 13:01 Go to next message
postcd is currently offline  postcd
Messages: 73
Registered: April 2013
Member
Should i automatically restart VM which is:
Unable to fork: Cannot allocate memory
?

Is this permanent state requiring shutdown of a service, alocating more memory or rebooting vps?

- maybe i can setup a shell script to detect "Unable to fork" out of "vzlist"command and then automatically restar that VM? vzctl restart VMID Similar script like this which trigger some action on high server load.

this is the script i use to show VMs load:
for ctid in `vzlist -1`
do
echo $ctid` vzctl exec $ctid uptime`
done

output:
130 10:24:06 up 149 days, 35 min, 0 users, load average: 0.00, 0.00, 0.00
190 10:24:06 up 15 days, 19:52, 0 users, load average: 0.21, 0.29, 0.35
200 17:24:06 up 8 days, 4:24, 0 users, load average: 0.02, 0.02, 0.09

[Updated on: Wed, 25 September 2013 14:30]

Report message to a moderator

Re: Should i restart? Unable to fork: Cannot allocate memory [message #50667 is a reply to message #50630] Sat, 05 October 2013 17:45 Go to previous message
postcd is currently offline  postcd
Messages: 73
Registered: April 2013
Member
Is it good to monitor /var/log/vzctl.log for this fork message?
Previous Topic: Problem with quota
Next Topic: Problem after vzkernel installation
Goto Forum:
  


Current Time: Wed May 01 13:08:52 GMT 2024

Total time taken to generate the page: 0.01763 seconds