• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

Apache childs are consuming a lot of RAM

Hi everyone!

All mornings all the httpd childs are consuming ~900M each one, I do a pmap of one of these process and I see this entry 000000001d39b000 831224K rw---    [ anon ], this could be due to a module? Below I paste more info about my apache implementation and the output of a pmap. I hope you can help me. Regards.

-bash-3.00# 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_deflate.c
  mod_log_config.c
  mod_logio.c
  mod_env.c
  mod_expires.c
  mod_headers.c
  mod_unique_id.c
  mod_setenvif.c
  mod_version.c
  mod_proxy.c
  mod_proxy_connect.c
  mod_proxy_ftp.c
  mod_proxy_http.c
  mod_proxy_scgi.c
  mod_proxy_ajp.c
  mod_proxy_balancer.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_info.c
  mod_suexec.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

Open in new window


45035:   /usr/local/apache/bin/httpd -k start -DSSL
0000000000400000   1076K r-x--  /usr/local/apache/bin/httpd
000000000060c000     44K rw---  /usr/local/apache/bin/httpd
0000000000617000     24K rw---    [ anon ]
000000001d39b000 831224K rw---    [ anon ]
000000004ff59000      4K -----    [ anon ]
000000004ff5a000  10240K rw---    [ anon ]
00002aaaaaaab000   1024K rw---    [ anon ]
00002b3286b05000     84K r-x--  /lib64/ld-2.3.4.so
00002b3286b1a000      4K rw---    [ anon ]
00002b3286c19000      4K r----  /lib64/ld-2.3.4.so
00002b3286c1a000      4K rw---  /lib64/ld-2.3.4.so
00002b3286c1b000    224K r-x--  /lib64/libssl.so.0.9.7a
00002b3286c53000   1020K -----  /lib64/libssl.so.0.9.7a
00002b3286d52000     20K rw---  /lib64/libssl.so.0.9.7a
00002b3286d57000      8K rw---    [ anon ]
00002b3286d59000   1084K r-x--  /lib64/libcrypto.so.0.9.7a
00002b3286e68000   1024K -----  /lib64/libcrypto.so.0.9.7a
00002b3286f68000    120K rw---  /lib64/libcrypto.so.0.9.7a
00002b3286f86000     16K rw---    [ anon ]
00002b3286f8a000     84K r-x--  /usr/lib64/libgssapi_krb5.so.2.2
00002b3286f9f000   1024K -----  /usr/lib64/libgssapi_krb5.so.2.2
00002b328709f000      4K rw---  /usr/lib64/libgssapi_krb5.so.2.2
00002b32870a0000    436K r-x--  /usr/lib64/libkrb5.so.3.2
00002b328710d000   1024K -----  /usr/lib64/libkrb5.so.3.2
00002b328720d000     16K rw---  /usr/lib64/libkrb5.so.3.2
00002b3287211000      4K rw---    [ anon ]
00002b3287212000      8K r-x--  /lib64/libcom_err.so.2.1
00002b3287214000   1020K -----  /lib64/libcom_err.so.2.1
00002b3287313000      4K rw---  /lib64/libcom_err.so.2.1
00002b3287314000    136K r-x--  /usr/lib64/libk5crypto.so.3.0
00002b3287336000   1020K -----  /usr/lib64/libk5crypto.so.3.0
00002b3287435000      8K rw---  /usr/lib64/libk5crypto.so.3.0
00002b3287437000     68K r-x--  /lib64/libresolv-2.3.4.so
00002b3287448000   1024K -----  /lib64/libresolv-2.3.4.so
00002b3287548000      4K r----  /lib64/libresolv-2.3.4.so
00002b3287549000      4K rw---  /lib64/libresolv-2.3.4.so
00002b328754a000     12K rw---    [ anon ]
00002b328754d000     76K r-x--  /usr/lib64/libz.so.1.2.1.2
00002b3287560000   1020K -----  /usr/lib64/libz.so.1.2.1.2
00002b328765f000      4K rw---  /usr/lib64/libz.so.1.2.1.2
00002b3287660000    532K r-x--  /lib64/tls/libm-2.3.4.so
00002b32876e5000   1020K -----  /lib64/tls/libm-2.3.4.so
00002b32877e4000      4K r----  /lib64/tls/libm-2.3.4.so
00002b32877e5000      4K rw---  /lib64/tls/libm-2.3.4.so
00002b32877e6000    156K r-x--  /usr/local/apache/lib/libaprutil-1.so.0.3.9
00002b328780d000   1020K -----  /usr/local/apache/lib/libaprutil-1.so.0.3.9
00002b328790c000      8K rw---  /usr/local/apache/lib/libaprutil-1.so.0.3.9
00002b328790e000      4K rw---    [ anon ]
00002b328790f000    128K r-x--  /usr/lib64/libexpat.so.0.5.0
00002b328792f000   1024K -----  /usr/lib64/libexpat.so.0.5.0
00002b3287a2f000      8K rw---  /usr/lib64/libexpat.so.0.5.0
00002b3287a31000    196K r-x--  /usr/local/apache/lib/libapr-1.so.0.3.9
00002b3287a62000   1024K -----  /usr/local/apache/lib/libapr-1.so.0.3.9
00002b3287b62000      4K rw---  /usr/local/apache/lib/libapr-1.so.0.3.9
00002b3287b63000      8K r-x--  /lib64/libuuid.so.1.2
00002b3287b65000   1024K -----  /lib64/libuuid.so.1.2
00002b3287c65000      4K rw---  /lib64/libuuid.so.1.2
00002b3287c66000      4K rw---    [ anon ]
00002b3287c67000     36K r-x--  /lib64/tls/librt-2.3.4.so
00002b3287c70000   1020K -----  /lib64/tls/librt-2.3.4.so
00002b3287d6f000      4K r----  /lib64/tls/librt-2.3.4.so
00002b3287d70000      4K rw---  /lib64/tls/librt-2.3.4.so
00002b3287d71000     64K rw---    [ anon ]
00002b3287d81000     32K r-x--  /lib64/libcrypt-2.3.4.so
00002b3287d89000   1020K -----  /lib64/libcrypt-2.3.4.so
00002b3287e88000      4K r----  /lib64/libcrypt-2.3.4.so
00002b3287e89000      4K rw---  /lib64/libcrypt-2.3.4.so
00002b3287e8a000    184K rw---    [ anon ]
00002b3287eb8000     64K r-x--  /lib64/tls/libpthread-2.3.4.so
00002b3287ec8000   1020K -----  /lib64/tls/libpthread-2.3.4.so
00002b3287fc7000      4K r----  /lib64/tls/libpthread-2.3.4.so
00002b3287fc8000      4K rw---  /lib64/tls/libpthread-2.3.4.so
00002b3287fc9000     20K rw---    [ anon ]
00002b3287fce000      8K r-x--  /lib64/libdl-2.3.4.so
00002b3287fd0000   1020K -----  /lib64/libdl-2.3.4.so
00002b32880cf000      4K r----  /lib64/libdl-2.3.4.so
00002b32880d0000      4K rw---  /lib64/libdl-2.3.4.so
00002b32880d1000   1216K r-x--  /lib64/tls/libc-2.3.4.so
00002b3288201000   1020K -----  /lib64/tls/libc-2.3.4.so
00002b3288300000     16K r----  /lib64/tls/libc-2.3.4.so
00002b3288304000      8K rw---  /lib64/tls/libc-2.3.4.so
00002b3288306000     28K rw---    [ anon ]
00002b328830d000    176K r-x--  /usr/local/apache/modules/mod_perl.so
00002b3288339000   1020K -----  /usr/local/apache/modules/mod_perl.so
00002b3288438000     16K rw---  /usr/local/apache/modules/mod_perl.so
00002b328844b000     84K r-x--  /lib64/libnsl-2.3.4.so
00002b3288460000   1020K -----  /lib64/libnsl-2.3.4.so
00002b328855f000      4K r----  /lib64/libnsl-2.3.4.so
00002b3288560000      4K rw---  /lib64/libnsl-2.3.4.so
00002b3288561000      8K rw---    [ anon ]
00002b3288563000      8K r-x--  /lib64/libutil-2.3.4.so
00002b3288565000   1020K -----  /lib64/libutil-2.3.4.so
00002b3288664000      4K r----  /lib64/libutil-2.3.4.so
00002b3288665000      4K rw---  /lib64/libutil-2.3.4.so
00002b3288666000    972K r-x--  /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so
00002b3288759000   1020K -----  /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so
00002b3288858000     56K rw---  /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so
00002b3288866000     16K rw---    [ anon ]
00002b328886a000      8K r-x--  /usr/local/apache/modules/mod_auth_passthrough.so
00002b328886c000   1020K -----  /usr/local/apache/modules/mod_auth_passthrough.so
00002b328896b000      4K rw---  /usr/local/apache/modules/mod_auth_passthrough.so
00002b328896c000      8K r-x--  /usr/local/apache/modules/mod_bwlimited.so
00002b328896e000   1020K -----  /usr/local/apache/modules/mod_bwlimited.so
00002b3288a6d000      4K rw---  /usr/local/apache/modules/mod_bwlimited.so
00002b3288a6e000     40K r-x--  /usr/local/apache/modules/mod_frontpage.so
00002b3288a78000   1020K -----  /usr/local/apache/modules/mod_frontpage.so
00002b3288b77000      4K rw---  /usr/local/apache/modules/mod_frontpage.so
00002b3288b78000     20K r-x--  /usr/local/apache/modules/mod_bw.so
00002b3288b7d000   1020K -----  /usr/local/apache/modules/mod_bw.so
00002b3288c7c000      4K rw---  /usr/local/apache/modules/mod_bw.so
00002b3288c7d000    316K r-x--  /usr/local/apache/modules/mod_jk.so
00002b3288ccc000   1024K -----  /usr/local/apache/modules/mod_jk.so
00002b3288dcc000      8K rw---  /usr/local/apache/modules/mod_jk.so
00002b3288dce000     88K r-x--  /usr/local/apache/modules/mod_fcgid.so
00002b3288de4000   1020K -----  /usr/local/apache/modules/mod_fcgid.so
00002b3288ee3000      8K rw---  /usr/local/apache/modules/mod_fcgid.so
00002b3288ee5000   1624K r-x--  /opt/xml2/lib/libxml2.so.2.7.8
00002b328907b000   1020K -----  /opt/xml2/lib/libxml2.so.2.7.8
00002b328917a000     40K rw---  /opt/xml2/lib/libxml2.so.2.7.8
00002b3289184000      4K rw---    [ anon ]
00002b3289185000    200K r-x--  /opt/lua/lib/liblua-5.1.3.so
00002b32891b7000   1024K -----  /opt/lua/lib/liblua-5.1.3.so
00002b32892b7000      8K rw---  /opt/lua/lib/liblua-5.1.3.so
00002b32892b9000    328K r-x--  /usr/local/apache/modules/mod_security2.so
00002b328930b000   1020K -----  /usr/local/apache/modules/mod_security2.so
00002b328940a000     16K rw---  /usr/local/apache/modules/mod_security2.so
00002b328940e000     36K r-x--  /usr/local/apache/modules/mod_cache.so
00002b3289417000   1020K -----  /usr/local/apache/modules/mod_cache.so
00002b3289516000      4K rw---  /usr/local/apache/modules/mod_cache.so
00002b3289517000     28K r-x--  /usr/local/apache/modules/mod_mem_cache.so
00002b328951e000   1020K -----  /usr/local/apache/modules/mod_mem_cache.so
00002b328961d000      4K rw---  /usr/local/apache/modules/mod_mem_cache.so
00002b328961e000    196K r-x--  /usr/local/apache/modules/mod_qos.so
00002b328964f000   1024K -----  /usr/local/apache/modules/mod_qos.so
00002b328974f000     12K rw---  /usr/local/apache/modules/mod_qos.so
00002b3289752000      4K rw-s-    [ anon ]
00002b3289753000     32K rw-s-  /usr/local/apache/logs/jk-runtime-status.42110
00002b3289761000     40K r-x--  /lib64/libnss_files-2.3.4.so
00002b328976b000   1024K -----  /lib64/libnss_files-2.3.4.so
00002b328986b000      4K r----  /lib64/libnss_files-2.3.4.so
00002b328986c000      4K rw---  /lib64/libnss_files-2.3.4.so
00002b328986d000   1252K rw-s-    [ anon ]
00002b32899a6000   1252K rw-s-    [ anon ]
00002b3289adf000     88K rw-s-    [ anon ]
00002b3289af5000    340K rw-s-    [ anon ]
00002b3289b4a000      4K rw-s-    [ anon ]
00002b3289b4b000      4K rw-s-    [ anon ]
00007fff7f16d000     84K rw---    [ stack ]
ffffffffff600000   8192K -----    [ anon ]
 total           900248K

Open in new window

0
mzanlongo
Asked:
mzanlongo
  • 4
  • 2
1 Solution
 
gheistCommented:
Something allocated 800MB of RAM....
start looking from auth_passwd. that or one of following is at fault.
i.e check if you are not mirroring gigabyte of LDAP/active directory, or allocating 2MB buffer for each shaped connection etc etc.
0
 
mzanlongoAuthor Commented:
Hi, thanks for your answer...

I tried to find out which module is the responsible for that allocation but I can´t find a solution, is there a way to trace the allocation?

Regards
Martin
0
 
gheistCommented:
You need to run strace or some memory leak detector (ask google)
Also most of the time factory-built apache works better than homebrew.
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
mzanlongoAuthor Commented:
I've requested that this question be deleted for the following reason:

I´ve migrated to a new system.
0
 
gheistCommented:
Did you follow part of advice about using distribution apache?
0
 
gheistCommented:
http:#38476490 but grade B since I did not swear loud enough about home-compiled apache.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now