Solved

Huge httpd processes (25+ Mb) and growing

Posted on 2001-07-12
5
263 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
  • 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 34

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now