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