You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Rob Ries <fr...@adrenaline.com> on 2000/07/14 01:42:06 UTC
apache restart causes httpd to grow and grow
I can serve requests with no dramatic changes in httpd size. However, each
"apachectl restart" causes the size of httpd (both parent and children
version) to grow by about 600K each restart. I'm new to this stuff, so I'm
sure it's me. Is it possible that the restart loads again the modules - ie,
I get 2 copies of the modules in memory? If so, can I do something about it?
Or is the rule: don't use "restart", just use "stop/start"? If that's the
case, what's "restart" for?
I have stripped the mod_perl routine, the startup.pl, and the httpd.conf
down to the bare minimum, and I still see the symptom. These files are close
to being straight out of the various texts and web pages I've been using to
learn this stuff.
Here are the various files:
************* STRIPPED DOWN Decision.pm
use strict;
package Apache::Decision;
use Apache::Constants qw(:common);
sub handler {
my $r = shift;
my $file = $r->filename;
$r->print(qq!confirm("CONFIRM THIS");!);
return OK;
}
1;
__END__
***********************************************
******************* STRIPPED DOWN startup.pl
!/usr/bin/perl
$ENV{MOD_PERL} or die "not running under mod_perl!";
BEGIN {
use Apache ();
use lib Apache->server_root_relative('lib/perl5');
}
use Apache::Registry ();
use Apache::Constants ();
use CGI qw(-compile :all);
use CGI::Carp ();
# Taking out the XML "use" lines below makes no difference -
# httpd still grows.
use lib qw(/home/frob/Learn/www/src/XML-Parser-2.29/blib/arch);
use lib qw(/home/frob/Learn/www/src/XML-Parser-2.29/blib/lib);
use lib qw(/usr/lib/perl5/5.00503/i386-linux);
use lib qw(/usr/lib/perl5/5.00503);
1;
***********************************************
*********************** STRIPPED DOWN httpd.conf
ServerType standalone
ServerRoot "/home/frob/Learn/www/apache"
PidFile /home/frob/Learn/www/apache/logs/httpd.pid
ScoreBoardFile /home/frob/Learn/www/apache/logs/httpd.scoreboard
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 1
MaxSpareServers 1
StartServers 1
MaxClients 150
MaxRequestsPerChild 0
LoadModule vhost_alias_module libexec/mod_vhost_alias.so
LoadModule env_module libexec/mod_env.so
LoadModule config_log_module libexec/mod_log_config.so
LoadModule mime_magic_module libexec/mod_mime_magic.so
LoadModule mime_module libexec/mod_mime.so
LoadModule negotiation_module libexec/mod_negotiation.so
LoadModule status_module libexec/mod_status.so
LoadModule info_module libexec/mod_info.so
LoadModule includes_module libexec/mod_include.so
LoadModule autoindex_module libexec/mod_autoindex.so
LoadModule dir_module libexec/mod_dir.so
LoadModule cgi_module libexec/mod_cgi.so
LoadModule asis_module libexec/mod_asis.so
LoadModule imap_module libexec/mod_imap.so
LoadModule action_module libexec/mod_actions.so
LoadModule speling_module libexec/mod_speling.so
LoadModule userdir_module libexec/mod_userdir.so
LoadModule alias_module libexec/mod_alias.so
LoadModule rewrite_module libexec/mod_rewrite.so
LoadModule access_module libexec/mod_access.so
LoadModule auth_module libexec/mod_auth.so
LoadModule anon_auth_module libexec/mod_auth_anon.so
LoadModule dbm_auth_module libexec/mod_auth_dbm.so
LoadModule digest_module libexec/mod_digest.so
LoadModule proxy_module libexec/libproxy.so
LoadModule cern_meta_module libexec/mod_cern_meta.so
LoadModule expires_module libexec/mod_expires.so
LoadModule headers_module libexec/mod_headers.so
LoadModule usertrack_module libexec/mod_usertrack.so
LoadModule unique_id_module libexec/mod_unique_id.so
LoadModule setenvif_module libexec/mod_setenvif.so
LoadModule perl_module libexec/libperl.so
ClearModuleList
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
AddModule mod_auth_dbm.c
AddModule mod_digest.c
AddModule mod_proxy.c
AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
AddModule mod_usertrack.c
AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_perl.c
Port 8080
User nobody
Group nobody
ServerAdmin frob@muddy.adrenalinegroup.com
DocumentRoot "/home/frob/Learn/www/apache/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/home/frob/Learn/www/apache/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig /home/frob/Learn/www/apache/conf/mime.types
</IfModule>
DefaultType text/plain
HostnameLookups Off
ErrorLog /home/frob/Learn/www/apache/logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /home/frob/Learn/www/apache/logs/access_log common
ServerSignature On
<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>
PerlRequire scripts/startup.pl
PerlFreshRestart On
<Location /decision/*>
SetHandler perl-script
PerlHandler Apache::Decision
</Location>
-----------------------------------------
Rob Ries
The Adrenaline Group, Inc.
1445 New York Avenue
4th Floor
Washington, DC 20005
work: 202.628.4438
fax: 202.628.7120
cell: 703.863.8606
http://www.adrenaline.com | building the next opportunity
Re: apache restart causes httpd to grow and grow
Posted by Rick Myers <ri...@sumthin.nu>.
On Jul 13, 2000 at 18:42:06 -0500, Rob Ries twiddled the keys to say:
> I can serve requests with no dramatic changes in httpd size. However, each
> "apachectl restart" causes the size of httpd (both parent and children
> version) to grow by about 600K each restart. I'm new to this stuff, so I'm
> sure it's me. Is it possible that the restart loads again the modules - ie,
> I get 2 copies of the modules in memory? If so, can I do something about it?
I can't answer that question. Sorry.
> Or is the rule: don't use "restart", just use "stop/start"? If that's the
> case, what's "restart" for?
I use "graceful" myself. Most of the time it will do a full restart, but
I've noticed that sometimes strange things happen. For those cases I
created a bash alias... (all on one line, of course ;)
restart /var/apache/bin/apachectl configtest && (
/var/apache/bin/apachectl stop ; sleep 2 ; /var/apache/bin/apachectl
start )
Rick Myers rik@sumthin.nu
----------------------------------------------------
The Feynman Problem 1) Write down the problem.
Solving Algorithm 2) Think real hard.
3) Write down the answer.
Re: apache restart causes httpd to grow and grow
Posted by "G.W. Haywood" <ge...@jubileegroup.co.uk>.
Hi there,
On Thu, 13 Jul 2000, Rob Ries wrote:
> I can serve requests with no dramatic changes in httpd
> size. However, each "apachectl restart" causes the size of httpd
> (both parent and children version) to grow by about 600K each
> restart.
Tried building static?
> I'm new to this stuff, so I'm sure it's me.
Maybe not on this one.
73,
Ged.