OpenVZ Forum


Home » General » Support » Out of memory problems
Out of memory problems [message #10639] Sun, 25 February 2007 16:18 Go to next message
optize is currently offline  optize
Messages: 33
Registered: September 2006
Member
I only have one VPS on the box. I used vzsplit 1 to make the config file so it should have all the resources of the box. However I'm running into a ton of "memory" problems;

Here is a "top" of the node;

Cpu(s): 3.0% us, 3.3% sy, 0.0% ni, 92.8% id, 0.0% wa, 0.0% hi, 1.0% si
Mem: 1023728k total, 448488k used, 575240k free, 38032k buffers
Swap: 2048276k total, 0k used, 2048276k free, 134688k cached


Here is a "top" of the VZ;

Cpu(s): 11.1% us, 3.2% sy, 0.0% ni, 85.5% id, 0.3% wa, 0.0% hi, 0.0% si
Mem: 1023728k total, 227320k used, 796408k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached


[client 68.98.x.x] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 11264 bytes) in /var/www/html/wm.php on line 47


Here's a list of my bean_counters;

http://pastebin.ca/371725

Thanks,
Re: Out of memory problems [message #10640 is a reply to message #10639] Sun, 25 February 2007 16:23 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
This has nothing to do with openvz- this is a limitation in your php environment. To verify:

grep memory_limit /path/to/php.ini # (usually /etc/php.ini)

You will see something like this:

memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)


Increase 8M to 64M or whatever your php script needs and restart apache.

Rick


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Out of memory problems [message #10641 is a reply to message #10640] Sun, 25 February 2007 16:24 Go to previous messageGo to next message
optize is currently offline  optize
Messages: 33
Registered: September 2006
Member
Sorry, should have clarified better.

I also get the same memory problems on bash.
Re: Out of memory problems [message #10642 is a reply to message #10641] Sun, 25 February 2007 16:29 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
do you mean when you launch a php script with a bash shell? Yes, this makes sense. Rolling Eyes Use my reccomendation, it will fix your problem.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Out of memory problems [message #10643 is a reply to message #10642] Sun, 25 February 2007 16:32 Go to previous messageGo to next message
optize is currently offline  optize
Messages: 33
Registered: September 2006
Member
rickb wrote on Sun, 25 February 2007 11:29

do you mean when you launch a php script with a bash shell? Yes, this makes sense. Rolling Eyes Use my reccomendation, it will fix your problem.




sigh no.

"When I am in bash, and I type ps aux, I get the same memory problems"

Rolling Eyes
Re: Out of memory problems [message #10644 is a reply to message #10643] Sun, 25 February 2007 16:36 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Quote:

[client 68.98.x.x] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 11264 bytes) in /var/www/html/wm.php on line 47


Quote:

"When I am in bash, and I type ps aux, I get the SAME memory problems"


you are getting a php fatal error from ps?- I really doubt this. I think you are not providing adequate information about your problem, or you just plain don't understand how to interpret what is going on.




-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Out of memory problems [message #10645 is a reply to message #10644] Sun, 25 February 2007 16:46 Go to previous messageGo to next message
optize is currently offline  optize
Messages: 33
Registered: September 2006
Member
rickb wrote on Sun, 25 February 2007 11:36

Quote:

[client 68.98.x.x] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 11264 bytes) in /var/www/html/wm.php on line 47


Quote:

"When I am in bash, and I type ps aux, I get the SAME memory problems"


you are getting a php fatal error from ps?- I really doubt this. I think you are not providing adequate information about your problem, or you just plain don't understand how to interpret what is going on.





Nevermind -- obviously you are clueless.

I'll fix the problem myself.
Re: Out of memory problems [message #10656 is a reply to message #10641] Mon, 26 February 2007 06:50 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi,

> "When I am in bash, and I type ps aux, I get the SAME memory problems"

You have no increased failcounters of kmemsize, privvmpages, shmpages or related memory parameters in /proc/user_beancouters,
are you sure that's an OpenVZ "out of memory" error not php ?

Can you please, post
- the error message inside bash
- relevant memory info's of used php.ini

Re: Out of memory problems [message #10662 is a reply to message #10656] Mon, 26 February 2007 10:13 Go to previous messageGo to next message
optize is currently offline  optize
Messages: 33
Registered: September 2006
Member
Sure thing. When I get it again, I'll paste it here.

However it was something like 'Cannot Fork -- Not enough memory' when I did simple commands such as 'ps', 'aux', etc.

However I was still able to do them in the hardware node.

I was under the impression that since I ran vzsplit 1, it would use all the resources on the hardware node. Therefore if vps 1 cant do a ps aux due to memory, the hardware node shouldn't either but that wasn't the case.

Hence why I posted a question about it here.

Re: Out of memory problems [message #10663 is a reply to message #10662] Mon, 26 February 2007 10:22 Go to previous message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Quote:

Cannot Fork -- Not enough memory


sounds like numproc and/or privvmpages is exhausting. I would check the failcnt column for these metrics in user_beancounters.


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Previous Topic: anyone successfully using openVPS in a VE?
Next Topic: *SOLVED* Installing Gnome kills my /dev!
Goto Forum:
  


Current Time: Tue May 21 18:12:02 GMT 2024

Total time taken to generate the page: 0.01647 seconds