PDA

View Full Version : [ubuntu] RAM usage optimization



AndrejsLi
March 26th, 2012, 11:22 AM
Hello,

my system is working on Ubuntu server 64 bit v. 10.04. Free RAM is 300 MB.

Homepage when used always get: PHP Fatal error: Out of memory (error 500 on browser)

I have a default Ubuntu settings, nothing is changing after install.

Current settings httpd:

StartServers 1
MinSpareServers 0
MaxSpareServers 0
ServerLimit 20000
MaxClients 256
MaxRequestsPerChild 20000

PHP memory limit 128

What settings can solve this problem?

Thank you and sorry about my english.

sanderj
March 26th, 2012, 12:28 PM
Wouldn't a PHP forum give better help? It looks like a PHP error, not a Ubuntu/Linux error.

AndrejsLi
March 26th, 2012, 01:03 PM
Wouldn't a PHP forum give better help? It looks like a PHP error, not a Ubuntu/Linux error.

I think, it's is in Ubuntu server configuration. Last I had 1 GB RAM system (now 512) and this problem did'nt exist.

Maybe I'm wrong, just a Ubuntu newbie..Can it be in mysql?

AndrejsLi
March 26th, 2012, 05:54 PM
Is it really Mysql configuration? Please, give any suggests.

d4m1r
March 26th, 2012, 08:43 PM
Hello,

my system is working on Ubuntu server 64 bit v. 10.04. Free RAM is 300 MB.

Homepage when used always get: PHP Fatal error: Out of memory (error 500 on browser)

I have a default Ubuntu settings, nothing is changing after install.

Current settings httpd:

StartServers 1
MinSpareServers 0
MaxSpareServers 0
ServerLimit 20000
MaxClients 256
MaxRequestsPerChild 20000

PHP memory limit 128

What settings can solve this problem?

Thank you and sorry about my english.

Those are really high numbers...try lowering them to:


StartServers 1
MinSpareServers 0
MaxSpareServers 0
ServerLimit 1000
MaxClients 100
MaxRequestsPerChild 100

And see if it makes a difference. I am sure it will fix your problem.

AndrejsLi
March 26th, 2012, 10:55 PM
Those are really high numbers...try lowering them to:


StartServers 1
MinSpareServers 0
MaxSpareServers 0
ServerLimit 1000
MaxClients 100
MaxRequestsPerChild 100

And see if it makes a difference. I am sure it will fix your problem.

Thank you. Not absolutely, but it make perfomance much better.