OpenVZ Forum


Home » General » Support » [solved] fork: Cannot allocate memory
[solved] fork: Cannot allocate memory [message #36617] Sun, 05 July 2009 12:41 Go to next message
levelx is currently offline  levelx
Messages: 4
Registered: July 2009
Location: Romania
Junior Member
Hi!

Premises:
HW: 4*XEON 2.5G, 4GB RAM.
OS: Debian 5, 2.6.26-2-openvz-686
vzctl version 3.0.22
APPs in container: LAMP+Mail
I have read the thread: http://forum.openvz.org/index.php?t=msg&goto=9094& and I understand UBC.

Problem:
Apache, mysql, clamd, spamd consume a lot of memory. It doesn't matter how much memory I allocate to a container, the memory resource will be exhausted soon and I get: fork: Cannot allocate memory. Usually, I need a reboot.

Now, this memory exhaustion cannot be avoided. I had to set both privvmpages and kmemsize to MAX_ULONG in order to have the machine operative for my customers.

My question is, why isn't the system swapping when it reaches the limits, instead it gives this error? How can this be avoided in future?

Thank you!
Best regards,
Bogdan


http://www.dualbyte.ro - IT services without modesty!

[Updated on: Mon, 06 July 2009 13:06] by Moderator

Report message to a moderator

Re: fork: Cannot allocate memory [message #36620 is a reply to message #36617] Sun, 05 July 2009 13:55 Go to previous messageGo to next message
levelx is currently offline  levelx
Messages: 4
Registered: July 2009
Location: Romania
Junior Member
cat /proc/sys/vm/overcommit_memory
0

Might this be a problem?


http://www.dualbyte.ro - IT services without modesty!
Re: fork: Cannot allocate memory [message #36624 is a reply to message #36617] Sun, 05 July 2009 15:15 Go to previous message
levelx is currently offline  levelx
Messages: 4
Registered: July 2009
Location: Romania
Junior Member
Hi! Please ignore my post! I thought I understood UBC. Now I finally got it right! Smile

http://www.dualbyte.ro - IT services without modesty!
Previous Topic: Tcpsndbuff size ?
Next Topic: Add iptable module for a container/VPS
Goto Forum:
  


Current Time: Sat Jul 20 11:31:00 GMT 2024

Total time taken to generate the page: 0.02354 seconds