OpenVZ Forum


Home » General » Support » -bash: fork: Cannot allocate memory
-bash: fork: Cannot allocate memory [message #29109] Sat, 05 April 2008 12:11 Go to previous message
gnutered is currently offline  gnutered
Messages: 12
Registered: April 2008
Junior Member
Trying to dd a 1G file in a Debian VE on a Debian HN causes the above error, and then the VE cannot be successfully restarted.

Background:
Kernel is official Debian Etch + openvz. Guests are two Debian minimals (vanilla, no change). HN has 512MB RAM.

I try to create a large file:

root@oneoneoneoneoneone:/# time dd if=/dev/zero of=~/zero bs=1024k count=1000
dd: writing `//zero': Disk quota exceeded
818+0 records in
817+0 records out
857153536 bytes (857 MB) copied, 14.4335 seconds, 59.4 MB/s


This fills the disk quota (no big deal). Second time I get my error:

root@oneoneoneoneoneone:/# time dd if=/dev/zero of=~/zero bs=1024k count=1000
-bash: fork: Cannot allocate memory
root@oneoneoneoneoneone:/# free -m
-bash: fork: Cannot allocate memory
root@oneoneoneoneoneone:/# logout
exited from VPS 111111


I deleted the zero file and even increased the disk quota, on the long shot that this was related to exceeding the disk quota. Did not fix.

I cannot restart the VE:

tony@sodium:/proc/bc/111111$ sudo vzctl restart 111111
Restarting VPS
Stopping VPS ...
VPS was stopped
vps-net_del WARNING: Function proxy_arp for eth0 is set to 0. Enable with 'sysctl -w net.ipv4.conf.eth0.proxy_arp=1'. See /usr/share/doc/vzctl/README.Debian.
VPS is unmounted
Starting VPS ...
VPS is mounted
Unable to fork: Cannot allocate memory
Not enough resources to start environment
VPS start failed
VPS is unmounted


I have enough free memory (or so it appears):

tony@sodium:/proc/bc/111111$ free -m
             total       used       free     shared    buffers     cached
Mem:           502        147        355          0          3        112
-/+ buffers/cache:         31        471
Swap:         2047          0       2047

I haven't yet restarted the server. I'd like to try and recover from this broken situation first.

Any clues?

Tony
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: startproc issue in a VPS
Next Topic: SOLVED: Hang on vzctl start/stop in futex() in the ve.
Goto Forum:
  


Current Time: Sun Sep 01 10:17:31 GMT 2024

Total time taken to generate the page: 0.05869 seconds