httpd memory usage very high

7,930

Main reason for your server load is due to memory_limit (768M) of php.ini. As your server has only 2GB ram could not able to handle if more http request made into the server leads of multiple connection of php that consume more memory. so, i suggest you to decrease the global php.ini memory_limit to optimal that is below 200M to control the load.

Share:
7,930

Related videos on Youtube

Tomazz
Author by

Tomazz

A fish, crying in the water...

Updated on September 18, 2022

Comments

  • Tomazz
    Tomazz almost 2 years

    I host a wordpress site on my server which has 2GB mem, I have used some cache plugin, but when I type ps -eo "%C : %p : %z : %a" | sort -k5 -nr in SSH, I see the httpd memory usage is very high.

    15.7 :  3131 : 4732740 : /usr/local/mysql/bin/mysqld
     0.5 :  3356 : 515860 : /usr/sbin/httpd
     0.6 :  3363 : 509308 : /usr/sbin/httpd
     0.6 :  3333 : 509308 : /usr/sbin/httpd
     0.5 :  3367 : 509308 : /usr/sbin/httpd
     0.5 :  3361 : 509308 : /usr/sbin/httpd
     0.5 :  3358 : 509308 : /usr/sbin/httpd
     0.5 :  3338 : 509308 : /usr/sbin/httpd
     0.4 :  3366 : 509308 : /usr/sbin/httpd
     0.3 :  3370 : 509308 : /usr/sbin/httpd
     0.3 :  3359 : 509308 : /usr/sbin/httpd
     0.0 :  3193 : 410980 : /usr/sbin/httpd
     ...
    

    The server always dead. I have set memory in php.ini like this:

    memory_limit = 768M
    memory = 20M
    
  • Tomazz
    Tomazz over 11 years
    1 httpd cost 50MB, if I set below 200M in php.ini, that mean my site only support 4 ips at one time?
  • Mughil
    Mughil over 11 years
    There is no relation between php memory_limit to ip connection. Php memory_limit is for the memory of php website, whereas the connection limit are defined in httpd.conf
  • Tomazz
    Tomazz over 11 years
    how many memory_limit is better? you tell me below 200M but in some blog, i saw somebody say 1/4 of total server. Do you have some authoritative article?
  • vonbrand
    vonbrand over 11 years
    Memory is not that expensive today, maybe it is time to add some...