Re: memory leak during server graceful restarts

2000-04-11 Thread Doug MacEachern

On Fri, 7 Apr 2000, Nikki Chumakov wrote:

 mod_perl probaly have memory leakage during rereading configs (e.g. on
 the apachectl graceful)

do you have PerlFreshRestart On?  if so, try turning it off.  i think dso
leaks on restart too, try linking static if that's the problem.  a static
httpd that doesn't have PerlFreshRestart On doesn't run any Perl code, so
it can't leak.  unless you have Perl sections in httpd.conf, do you?




Re: memory leak during server graceful restarts

2000-04-11 Thread Nikki Chumakov

Doug MacEachern wrote:

 On Fri, 7 Apr 2000, Nikki Chumakov wrote:

  mod_perl probaly have memory leakage during rereading configs (e.g. on
  the apachectl graceful)

 do you have PerlFreshRestart On?  if so, try turning it off.  i think dso
 leaks on restart too, try linking static if that's the problem.  a static
 httpd that doesn't have PerlFreshRestart On doesn't run any Perl code, so
 it can't leak.  unless you have Perl sections in httpd.conf, do you?

Well, actually I checked without any perl_mod specific config statements in httpd.conf 
and without any http requests. With LoadModule/AddModule mod_perl the server grows in 
size during every reload, and doesn't grow with AddModule mod_perl commented out.

So, this is apparently mod_perl DSO problem, that happens before compiling any Perl 
code.






Re: memory leak during server graceful restarts

2000-04-10 Thread Douglas Leonard

I have run into the same issue also both with mod_perl as a DSO module or
compiled staticly.  I have tested it using apache-1.3.6 and apache-1.3.12
w/ mod_perl-1.22 and mod_perl-1.21.  The memory growth also occurs if I
HUP the server rather than sending USR1.  Since the problem only occurs if
mod_perl is loaded (DSO) or staticly loaded, I assume the problem lies in
memory cleanup by modperl.  Even if I do nothing other than have mod_perl
installed and HUP the parent, the process will grow at a relatively rapid
rate of over 1MB per HUP instance.

The reason I noticed this is that I cache some relatively static database
information in the parent process by assignment to a package's scoped hash
variables in my startup.pl.  I wanted to refresh this cache hourly just in
case changes did happen to occur in the database tables I was caching.

I am curious as to whether there is a better way to go about caching this
data and refreshing it without the problem of watching your apache process
size grow every time you HUP it.  Any helpful hints would be appreciated.

The platforms are various Linux kernels ranging from 2.0x to 2.3x.  The
majority of which are linux-2.2.10.

Douglas Leonard
[EMAIL PROTECTED]

On Fri, 7 Apr 2000, Nikki Chumakov wrote:

 mod_perl probaly have memory leakage during rereading configs (e.g. on
 the apachectl graceful)
 
 My system:
 
 RH 6.1,
 linux-2.2.15pre17
 glibc-2.1
 
 apache-1.3.12
 mod_ssl-2.6.2
 russian patches (ftp.lexa.ru/pub/apache-rus/) PL29.4
 mm-1.0.12
 mod_perl-1.22
 
 With mod_perl module enabled in httpd.conf every 'apachectl graceful'
 increase the data memory segment of parent server (and thus the child's
 as well).