Solved

Huge httpd processes (25+ Mb) and growing

Posted on 2001-07-12
5
278 Views
Last Modified: 2012-06-21
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?
0
Comment
Question by:gr8gonzo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 1

Expert Comment

by:manucorp
ID: 6289183
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
0
 
LVL 35

Author Comment

by:gr8gonzo
ID: 6290540
Nope. Didn't work. The leak still increases and the httpd processes are still huge.
0
 
LVL 1

Accepted Solution

by:
manucorp earned 200 total points
ID: 6290574
so decrease the number in MaxRequestsPerChild
1000 is a lot try 50 or something like that

mod_perl has memory leak if i remember

did you try other virtual hosts system and then you can kick out mod_perl
like based on directory
http://funkcity.com/0101/projects/dynvhost/

mysql based
http://www.fractal.net/mod_v2h.tm
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question