Link to home
Start Free TrialLog in
Avatar of gr8gonzo
gr8gonzoFlag for United States of America

asked on

Huge httpd processes (25+ Mb) and growing

I'm running FreeBSD 4.2, Apache 1.3.14 with a bunch of modules, including mod_php4, mod_perl, and mod_ssl. I have been using a mod_perl script to dynamically write a bunch of VirtualHost files, but it seemed to be leaking memory everytime I restarted the server, so I took out the mod_perl stuff, and even disabled the loading of the mod_perl module (cleared the LoadModule and AddModule commands for it). The size dropped about 4 megs but it still leaks about 100k of RAM everytime the server is restarted. The only way to refresh it is to stop and start the server, but it still starts up at about 26 megs per process.

I also run a ridiculous amount of VirtualHosts (probably around 200, maybe more) on the server. I'm not sure if that will contribute to the large size or not, but I have a separate config file with them in it that I "Include" into the httpd.conf file.

Again, I load a bunch of modules. First I run LoadModules, then do a ClearModuleList and then AddModules. Here are the modules I am loading:
mod_mmap_static
mod_vhost_alias
mod_env
mod_define
mod_log_config
mod_mime_magic
mod_mime
mod_negotiation
mod_status
mod_info
mod_include
mod_autoindex
mod_dir
mod_cgi
mod_asis
mod_imap
mod_actions
mod_speling
mod_userdir
mod_alias
mod_rewrite
mod_access
mod_auth
mod_auth_anon
mod_auth_db
mod_digest
mod_proxy
mod_cern_meta
mod_expires
mod_headers
mod_usertrack
mod_unique_id
mod_setenvif
mod_php4
mod_perl
mod_ssl
mod_so            

Here are my max/min settings:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 15
StartServers 5
MaxClients 200
MaxRequestsPerChild 0

Is there a way to cut down on memory consumption AND keep memory from leaking?
Avatar of manucorp
manucorp

MaxRequestsPerChild 1000

try to change MaxRequestPerChild
if there is a memory leak in one module you won't have any problem cause else your child is in memory for ever so it grow quickly
Avatar of gr8gonzo

ASKER

Nope. Didn't work. The leak still increases and the httpd processes are still huge.
ASKER CERTIFIED SOLUTION
Avatar of manucorp
manucorp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial