Solved

Huge httpd processes (25+ Mb) and growing

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

862 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

21 Experts available now in Live!

Get 1:1 Help Now