apache eat up too many ram per child

Posted by mrc4r7m4n on Server Fault See other posts from Server Fault or by mrc4r7m4n
Published on 2010-05-20T08:20:18Z Indexed on 2010/05/20 8:32 UTC
Read the original article Hit count: 952

Filed under:
|

Hello to everyone.

I've got fallowing problem: Apache eat to many ram per child.

The fallowing comments shows:

  1. cat /etc/redhat-release -- Fedora release 8 (Werewolf)

  2. free -m:

             total       used       free     shared    buffers     cached
Mem:          3566       3136        429          0        339       1907
-/+ buffers/cache:        889       2676
Swap:         4322          0       4322

I know that you will say that there is nothing to worry about because swap is not use, but i think it's not use for now.

3.httpd -v:

Server version: Apache/2.2.14 (Unix)

4.httpd -l:

Compiled in modules:

core.c

mod_authn_file.c

mod_authn_default.c

mod_authz_host.c

mod_authz_groupfile.c

mod_authz_user.c

mod_authz_default.c

mod_auth_basic.c

mod_include.c

mod_filter.c

mod_log_config.c

mod_env.c

mod_setenvif.c

mod_version.c

mod_ssl.c

prefork.c

http_core.c

mod_mime.c

mod_status.c

mod_autoindex.c

mod_asis.c

mod_cgi.c

mod_negotiation.c

mod_dir.c

mod_actions.c

mod_userdir.c

mod_alias.c

mod_rewrite.c

mod_so.c

5.List of loaded dynamic modules:

LoadModule authz_host_module

modules/mod_authz_host.so LoadModule

include_module modules/mod_include.so

LoadModule log_config_module

modules/mod_log_config.so LoadModule

setenvif_module

modules/mod_setenvif.so LoadModule

mime_module modules/mod_mime.so

LoadModule autoindex_module

modules/mod_autoindex.so LoadModule

vhost_alias_module modules/mod_vhost_alias.so LoadModule

negotiation_module

modules/mod_negotiation.so LoadModule

dir_module modules/mod_dir.so

LoadModule alias_module

modules/mod_alias.so LoadModule

rewrite_module modules/mod_rewrite.so

LoadModule proxy_module

modules/mod_proxy.so LoadModule

cgi_module modules/mod_cgi.so

6.My prefrok directive

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   25
ServerLimit       80
MaxClients        80
MaxRequestsPerChild  4000
</IfModule>

KeepAliveTimeout 6
MaxKeepAliveRequests 100
KeepAlive On

7.top -u apache: ctrl+ M

top - 09:19:42 up 2 days, 19 min,  2 users,  load average: 0.85, 0.87, 0.80
Tasks: 113 total,   1 running, 112 sleeping,   0 stopped,   0 zombie
Cpu(s):  7.3%us, 15.7%sy,  0.0%ni, 75.7%id,  0.0%wa,  0.7%hi,  0.7%si,  0.0%st
Mem:   3652120k total,  3149964k used,   502156k free,   348048k buffers
Swap:  4425896k total,        0k used,  4425896k free,  1944952k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16956 apache    20   0  700m 135m 100m S  0.0  3.8   2:16.78 httpd
16953 apache    20   0  565m 130m  96m S  0.0  3.7   1:57.26 httpd
16957 apache    20   0  587m 129m 102m S  0.0  3.6   1:47.41 httpd
16955 apache    20   0  567m 126m  93m S  0.0  3.6   1:43.60 httpd
17494 apache    20   0  626m 125m  96m S  0.0  3.5   1:58.77 httpd
17515 apache    20   0  540m 120m  88m S  0.0  3.4   1:45.57 httpd
17516 apache    20   0  573m 120m  88m S  0.0  3.4   1:50.51 httpd
16954 apache    20   0  551m 120m  88m S  0.0  3.4   1:52.47 httpd
17493 apache    20   0  586m 120m  94m S  0.0  3.4   1:51.02 httpd
17279 apache    20   0  568m 117m  87m S 16.0  3.3   1:51.87 httpd
17302 apache    20   0  560m 116m  90m S  0.3  3.3   1:59.06 httpd
17495 apache    20   0  551m 116m  89m S  0.0  3.3   1:47.51 httpd
17277 apache    20   0  476m 114m  81m S  0.0  3.2   1:37.14 httpd
30097 apache    20   0  536m 113m  83m S  0.0  3.2   1:47.38 httpd
30112 apache    20   0  530m 112m  81m S  0.0  3.2   1:40.15 httpd
17513 apache    20   0  516m 112m  85m S  0.0  3.1   1:43.92 httpd
16958 apache    20   0  554m 111m  82m S  0.0  3.1   1:44.18 httpd
 1617 apache    20   0  487m 111m  85m S  0.0  3.1   1:31.67 httpd
16952 apache    20   0  461m 107m  75m S  0.0  3.0   1:13.71 httpd
16951 apache    20   0  462m 103m  76m S  0.0  2.9   1:28.05 httpd
17278 apache    20   0  497m 103m  76m S  0.0  2.9   1:31.25 httpd
17403 apache    20   0  537m 102m  79m S  0.0  2.9   1:52.24 httpd
25081 apache    20   0  412m 101m  70m S  0.0  2.8   1:01.74 httpd

I guess thats all information needed to help me solve this problem. I think the virt memory is to big, the same res. The consumption of ram is increasing all the time. Maybe it's memory leak because i see there is so many static modules compiled.

Could someone help me with this issue? Thank you in advance.

© Server Fault or respective owner

Related posts about apache

Related posts about memory-usage