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.
Related videos on Youtube
Comments
-
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 over 11 years1 httpd cost 50MB, if I set below 200M in
php.ini
, that mean my site only support4 ips
at one time? -
Mughil over 11 yearsThere 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 over 11 yearshow many
memory_limit
is better? you tell mebelow 200M
but in some blog, i saw somebody say1/4 of total server
. Do you have some authoritative article? -
vonbrand over 11 yearsMemory is not that expensive today, maybe it is time to add some...