Solved

Huge httpd processes (25+ Mb) and growing

Posted on 2001-07-12
5
276 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

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). #…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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