Help me! Site with DB running slow caused by low memory

Hi,

I have a fresh install (2 days ago) of ubuntu 12.04 because switch the old server to this but now I have a memory issue:

$ free -m
             total       used       free     shared    buffers     cached
Mem:           989        946         42          0         40        313
-/+ buffers/cache:        592        396
Swap:          511          7        504

I tried "htop" but the result of free memory is completely different:

~~![](<URL url=)http://i.imgur.com/FdTIuyI.jpg?1" />

My apache Config:

 <ifmodule mpm_prefork_module="">StartServers          2
    MinSpareServers       6
    MaxSpareServers      12
    MaxClients           80
    MaxRequestsPerChild 3000</ifmodule> 

My MySQL config:

key_buffer              = 32M
max_allowed_packet      = 1M
thread_stack            = 128K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover          = BACKUP
#max_connections        = 100
table_cache             = 32
#thread_concurrency     = 10

All of my site with a DB (magento, prestashop, wordpress ecc) are really slow, I used the mysql config in your documentation and the response time was: magento 10 seconds, prestashop 5 seconds, wordpress 12 seconds.

I haven't traffic these sites, mysql work in localhost, I performed databases, file hosts look good.

Help to find the issue :(~~

7 Replies

You have 396MB of free RAM.

http://www.linuxatemyram.com/

Whatever database issues you're having, they have nothing to do with running out of memory.

Ok, a linode admin told me that my Linode is OOMing .. so where is the problem?

MaxClients 80 that's too high for a 1GB node, drop it to say 5 and slowly increase it until you have a balance between memory usage (the green part of bar in htop) and performance. You may need to upgrade the size of your node.

@obs:

MaxClients           80

that's too high for a 1GB node, drop it to say 5 and slowly increase it until you have a balance between memory usage (the green part of bar in htop) and performance. You may need to upgrade the size of your node.

The problem is still the same :(

If you go there my settings are equals to the reccomendid settings.

What recommended settings, it's unlikely you could achieve the balance in the 7 minutes between my post and yours.

@obs:

What recommended settings, it's unlikely you could achieve the balance in the 7 minutes between my post and yours.

I was planning to note the same thing.

@daniel.vb:

@obs:

MaxClients           80

that's too high for a 1GB node, drop it to say 5 and slowly increase it until you have a balance between memory usage (the green part of bar in htop) and performance. You may need to upgrade the size of your node.

The problem is still the same :(

If you go there my settings are equals to the reccomendid settings.

I tried but nothing change :( (I increase maxclient 5 each time and reset apache)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct