apache use >300 MB ram

iprodua

Verified User
Joined
Oct 5, 2007
Messages
88
apache use too much memory. How to find, what is wrong?

27949 apache 19 0 318m 279m 5500 S 2.7 15.3 0:08.03 httpd
27918 apache 16 0 319m 280m 4796 S 2.0 15.3 0:10.03 httpd
...

php:
'./configure' '--with-apxs2' '--with-curl=/usr/local/lib' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-kerberos' '--with-openssl' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-pcre-regex=/usr/local' '--with-pdo-mysql=/usr' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--enable-zip' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-mbstring' '--with-imap=/usr/lib/dovecot/imap' '--with-imap-ssl' '--enable-soap' '--with-xsl'


apache_modules:
core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_filter mod_deflate mod_log_config mod_logio mod_env mod_expires mod_headers mod_unique_id mod_setenvif mod_version mod_proxy mod_proxy_connect mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_proxy_ajp mod_proxy_balancer mod_ssl prefork http_core mod_mime mod_dav mod_status mod_autoindex mod_asis mod_suexec mod_cgi mod_dav_fs mod_dav_lock mod_negotiation mod_dir mod_actions mod_userdir mod_alias mod_rewrite mod_so mod_php5 mod_ruid2 mod_rpaf-2
 
neither server_status nor mod_suphp :confused:

maybe mod_ruid2, but i don't think so

any other ideas? log files, or something else? What can I try?...:(
 
They are not supposed to lower usage of RAM, with the help of them you can investigate the issue. So I would not wait for a ready solution if I were you, you should analyze what site and scripts are requested the most. Configuring Apache for maximum performance is tricky, there are no hard and fast rules. To limit an amount of used by Apache RAM you might want to use a numbers of techniques and tools:

1. Limit/adjust Apache (MinSpareServers, MaxSpareServers, and StartServers, MaxClients... etc)
2. ulimit
3. PAM Limits
4. iptables (or other firewall) to limit number of concurrent connections to apache from an IP.
5. frontend/backend architecture
6. Limit/adjust PHP
7. Limit/adjust MySQL
8. etc...

So either learn it by yourself... or hire somebody to do it for you.

This might be useful http://www.howtoforge.com/configuring_apache_for_maximum_performance
 
Back
Top