OpenVZ Forum


Home » General » Support » Cannot allocate memory
Cannot allocate memory [message #16120] Thu, 23 August 2007 08:50 Go to next message
leoman is currently offline  leoman
Messages: 3
Registered: July 2007
Location: Turkey
Junior Member

Hi all,

I installing a new openvz on debian etch via this document [1].
I create a new virtual machine this [1] configrations.
Ok, my vps running normally because i'm try to installing VHCS CP. I have got any error when installation time but i can see not running bind dns server. I try to starting manually (/etc/init.d/bind9 start) but i get

Starting domain name service...: bind/etc/init.d/bind9: line 24: /bin/mkdir: Cannot allocate memory
/etc/init.d/bind9: line 25: /bin/chmod: Cannot allocate memory
/etc/init.d/bind9: line 26: /dev/null: Too many open files in system
/etc/init.d/bind9: fork: Cannot allocate memory


errors. /bin/mkdir is running normally. (mkdir /root/test, ok)

Same problem for proftpd,

/etc/init.d/proftpd: line 13: /bin/grep: Cannot allocate memory
/etc/init.d/proftpd: fork: Cannot allocate memory
Starting ftp server: proftpd/etc/init.d/proftpd: line 94: /sbin/start-stop-daemon: Cannot allocate memory
failed!


Why i get this erros.

Thanks all.

uname -a : Linux vps01 2.6.18-openvz-12-1etch1-686 #1 SMP Sat May 5 00:26:59 CEST 2007 i686 GNU/Linux

Links :

[1] http://wiki.openvz.org/Installation_on_Debian


Configs:
[1] /etc/vz/conf/1.conf

ONBOOT="yes"
# UBC parameters (in form of barrier:limit)
# Primary parameters
AVNUMPROC="40:40"
NUMPROC="65:65"
NUMTCPSOCK="80:80"
NUMOTHERSOCK="80:80"
VMGUARPAGES="131072:153600"
# Secondary parameters
KMEMSIZE="2752512:2936012"
TCPSNDBUF="319488:524288"
TCPRCVBUF="319488:524288"
OTHERSOCKBUF="132096:336896"
DGRAMRCVBUF="132096:132096"
OOMGUARPAGES="6144:2147483647"
# Auxiliary parameters
LOCKEDPAGES="32:32"
SHMPAGES="8192:8192"
PRIVVMPAGES="49152:53575"
NUMFILE="2048:2048"
NUMFLOCK="100:110"
NUMPTY="16:16"
NUMSIGINFO="256:256"
DCACHESIZE="1048576:1097728"
DCACHESIZE="1048576:1097728"

PHYSPAGES="0:2147483647"
NUMIPTENT="128:128"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="10485760:10485760"
DISKINODES="200000:220000"
QUOTATIME="0"

# CPU fair sheduler parameter
CPUUNITS="1000"
VE_ROOT="/var/lib/vz/root/$VEID"
VE_PRIVATE="/var/lib/vz/private/$VEID"
OSTEMPLATE="debian-4.0-i386-minimal"
ORIGIN_SAMPLE="vps.basic"
IP_ADDRESS="x.x.x.x"
CPULIMIT="100"
HOSTNAME="mirror.test.net"
NAMESERVER="4.2.2.1"




Re: Cannot allocate memory [message #16124 is a reply to message #16120] Thu, 23 August 2007 12:57 Go to previous messageGo to next message
Valmont is currently offline  Valmont
Messages: 225
Registered: September 2005
Senior Member
Just check failcnt in /proc/user_beancounters
Re: Cannot allocate memory [message #16138 is a reply to message #16124] Thu, 23 August 2007 20:08 Go to previous messageGo to next message
locutius is currently offline  locutius
Messages: 125
Registered: August 2007
Senior Member
the basic conf is an extremely conservative VPS with 24MB RAM and everything tuned down

use the vzsplit utility to output an 8 way split of your hardware. compare the output of vzsplit with the conf of your VPS and you will see the problem. experiment with vzsplit until you find what you need

that was the solution and as Valmont says the way to check what is happening inside the VPS:

cat /proc/user_beancounters
Re: Cannot allocate memory [message #16198 is a reply to message #16138] Mon, 27 August 2007 15:56 Go to previous message
leoman is currently offline  leoman
Messages: 3
Registered: July 2007
Location: Turkey
Junior Member


#vzsplit -n 2 out;

Enter the number of VEs: 2
# Configuration file generated by vzsplit for 2 VEs
# on HN with total amount of physical mem 2017 Mb
# low memory 874 Mb, swap size 3388 Mb, Max treads 8000
# Resourse commit level 0:
# Free resource distribution. Any parameters may be increased
# Primary parameters
NUMPROC="4000:4000"
AVNUMPROC="1119:1119"
NUMTCPSOCK="4000:4000"
NUMOTHERSOCK="4000:4000"
VMGUARPAGES="309906:2147483647"

# Secondary parameters
KMEMSIZE="91691008:100860108"
TCPSNDBUF="14179669:30563669"
TCPRCVBUF="14179669:30563669"
OTHERSOCKBUF="7089834:23473834"
DGRAMRCVBUF="7089834:7089834"
OOMGUARPAGES="309906:2147483647"
PRIVVMPAGES="309906:340896"

# Auxiliary parameters
LOCKEDPAGES="4477:4477"
SHMPAGES="30990:30990"
PHYSPAGES="0:2147483647"
NUMFILE="35808:35808"
NUMFLOCK="1000:1100"
NUMPTY="400:400"
NUMSIGINFO="1024:1024"
DCACHESIZE="20024667:20625408"
NUMIPTENT="200:200"
DISKSPACE="3227115:3549827"
DISKINODES="1921010:2113112"
CPUUNITS="99783"
Previous Topic: [ASK] limit BW of one ve
Next Topic: Perl code gets 127.0.0.1, not public IP Address
Goto Forum:
  


Current Time: Sun Nov 17 04:53:12 GMT 2024

Total time taken to generate the page: 0.02901 seconds