Help - memory leak problems - do some debugging

Guys,
Top outputs and pasting configs really wont help debug this… If you wanna see whats going on do a few things… 1. Get off of solaris 2.6 heh 2. Try to perform a pstack on the pid like 5 times in 5 second intervals should give you some nice info. A prstat -cvm will also show you active process stats… and a vmstat to show what memory utilization is…
Also check disk usage… maybe its reading and writing a lot iostat -xpm 5 3 will give us an idea if its doing a lot of work… a truss of the process might be helpful too… also checking file descriptor making sure it closes them ok…

Any chance anyone can help me get this working on solaris 8 apache 1.3.28 /w mod_ssl and mod_perl… i keep getting those handel=>new errors :frowning: id really like this to work hehe…

-MJFrom: Barry Byrne [mailto:barry.byrne@wbtsystems.com]
Sent: Friday, October 17, 2003 6:08 AM
To: douglas.borrie@eject.co.za
Cc: rt-users@lists.fsck.com
Subject: RE: [rt-users] Help - memory leak problems

I’ve had the same problems, and try to get around it by restarting Apache
with a cron job on a daily basis. However last night, ran out of swap again
and sendmail kept tempfailing a mail with an attachment (about 1.5MB) which
resulted in 70 copies of the attachment in the RT database - making it
practically impossible to open the ticket in RT. I’ve remove the attachments
this morning, and I’ve also try removing DBI from the apache config and
reducing the number of MaxRequestsPerChild. Will see what affect this has.

Cheers,

Barry

Barry Byrne, IT Manager,
WBT Systems, Block 2, Harcourt Centre
Harcourt Street, Dublin 2, Ireland

-----Original Message-----
From: rt-users-admin@lists.fsck.com
[mailto:rt-users-admin@lists.fsck.com]On Behalf Of
douglas.borrie@eject.co.za
Sent: 17 October 2003 10:25
To: Ruslan U. Zakirov
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] Help - memory leak problems

This is complete apache config

ServerType standalone
ServerRoot "/usr/local/apache_1.3.28"
PidFile /usr/local/apache_1.3.28/logs/httpd.pid
ScoreBoardFile /usr/local/apache_1.3.28/logs/httpd.scoreboard
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 50
MaxRequestsPerChild 0
Port 80
User nobody
Group nobody
ServerAdmin serveradmin@host.domain.name
ServerName host.domain.name
DocumentRoot “/usr/local/apache_1.3.28/htdocs”

Options FollowSymLinks AllowOverride None

<Directory “/usr/local/apache_1.3.28/htdocs”>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all

UserDir public_html DirectoryIndex index.html

AccessFileName .htaccess
<Files ~ “^.ht”>
Order allow,deny
Deny from all
Satisfy All

UseCanonicalName On

TypesConfig /usr/local/apache_1.3.28/conf/mime.types

DefaultType text/plain

MIMEMagicFile /usr/local/apache_1.3.28/conf/magic

HostnameLookups Off

ErrorLog /usr/local/apache_1.3.28/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 /usr/local/apache_1.3.28/logs/access_log common

ServerSignature Off

Alias /icons/ "/usr/local/apache_1.3.28/icons/" Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all
Alias /manual/ "/usr/local/apache_1.3.28/htdocs/manual/"
<Directory "/usr/local/apache_1.3.28/htdocs/manual">
    Options Indexes FollowSymlinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /cgi-bin/ "/usr/local/apache_1.3.28/cgi-bin/"
<Directory "/usr/local/apache_1.3.28/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
IndexOptions FancyIndexing AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip AddIconByType (TXT,/icons/text.gif) text/* AddIconByType (IMG,/icons/image2.gif) image/* AddIconByType (SND,/icons/sound2.gif) audio/* AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif
ReadmeName README
HeaderName HEADER
AddLanguage da .dk AddLanguage nl .nl AddLanguage en .en AddLanguage et .ee AddLanguage fr .fr AddLanguage de .de AddLanguage el .el AddLanguage he .he AddCharset ISO-8859-8 .iso8859-8 AddLanguage it .it AddLanguage ja .ja AddCharset ISO-2022-JP .jis AddLanguage kr .kr AddCharset ISO-2022-KR .iso-kr AddLanguage nn .nn AddLanguage no .no AddLanguage pl .po AddCharset ISO-8859-2 .iso-pl AddLanguage pt .pt AddLanguage pt-br .pt-br AddLanguage ltz .lu AddLanguage ca .ca AddLanguage es .es AddLanguage sv .sv AddLanguage cs .cz .cs AddLanguage ru .ru AddLanguage zh-TW .zh-tw AddCharset Big5 .Big5 .big5 AddCharset WINDOWS-1251 .cp-1251 AddCharset CP866 .cp866 AddCharset ISO-8859-5 .iso-ru AddCharset KOI8-R .koi8-r AddCharset UCS-2 .ucs2 AddCharset UCS-4 .ucs4 AddCharset UTF-8 .utf8
<IfModule mod_negotiation.c>
    LanguagePriority en da nl et fr de el it ja kr no pl pt

pt-br ru ltz ca
es sv tw

AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz


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

NameVirtualHost *

ServerName host.domain.name
DocumentRoot /opt/rt3/share/html
AddDefaultCharset UTF-8
PerlRequire /opt/rt3/bin/webmux.pl

SetHandler perl-script
PerlHandler RT::Mason

Quoting “Ruslan U. Zakirov” cubic@acronis.ru:

douglas.borrie@eject.co.za wrote:
Look through all config not only VirtualHost section.

This was my previous config

ServerName host.domain.name DocumentRoot /opt/rt3/share/html AddDefaultCharset UTF-8
    PerlModule Apache::DBI
    PerlRequire /opt/rt3/bin/webmux.pl

    <Location />
            SetHandler perl-script
            PerlHandler RT::Mason
    </Location>

I changed it to this (is this what you meant by turning off
Apache::DBI?)

ServerName host.domain.name DocumentRoot /opt/rt3/share/html AddDefaultCharset UTF-8
    PerlRequire /opt/rt3/bin/webmux.pl

    <Location />
            SetHandler perl-script
            PerlHandler RT::Mason
    </Location>

If that is what you meant, then yes the issue is still there.

Quoting Jesse Vincent jesse@bestpractical.com:

Do you still see this issue if you turn off Apache::DBI?

Hi all

I recently installed RT 3.0.4 (and later RT 3.0.6) using
apache 1.3.28
and

mod_perl 1.29 statically linked.
I followed all the installation instructions and have
installed it on a

Solaris

2.6 as well as a Redhat Linux 9
box but with the same problem occuring on both.
The problem appears to be some sort of memory leak where memory is

allocated but

is never released.
The size of the httpd processes grow after every request.
The end result is that all RAM is consumed and after a while
all swap is

also

exhausted.

Below are samples taken of the relevant processes (top
output - sorted by

memory

usage) while a dummy load is applied.
The load is generated by multiple web clients with a URL
similar to the

following
http://host.domain.name/index.html?HomeRefreshInterval=2 (Refresh the
home

page

every 2 seconds - too speed things up a bit)

As you’ll see the size of the processes grow and eventually
all memory is

used.

The only thing that I have found to help is to set
MaxRequestsPerChild=1

in

apache config,
but performance is really bad as after each request is handled that
apache

child

is killed and another
is restarted in it’s place. I also have to limit MinSpareServers and
MaxSpareServers to about 4 with
MaxClients also set to 4.

I have searched through the mailing list archives but I
don’t see anybody

else

with
the same problem (some are similar but I don’t seem to find
a solution)

I would really appreciate any help you could give me.

This email was scanned by ICL’s anti-virus solution at
http://www.eject.co.za

This email was scanned by ICL’s anti-virus solution at
http://www.eject.co.za
rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm