huge apache+mod_perl processes

This is a multi-part message in MIME format.

------=_NextPart_000_0040_01CB5F0F.6427F700
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

Greetings,

We have a problem with huge Apache+mod_perl2 processes of 150-200 Mb in =
size. After apache restart they are usually 40-50 Mb in size, then in a =
minute grow up to 100-150 Mb and then some time later may grow up to 200 =
Mb. I suspect a certain type of http queries and would like to know if =
there are any manuals/howtos/tools to investiagate such cases.

# perl -v
This is perl, v5.10.1 (*) built for x86_64-linux

# strings /usr/local/apache2/modules/mod_perl.so | grep mod_perl\/
mod_perl/2.0.4

# /usr/local/apache2/bin/httpd -v
Server version: Apache/2.2.14 (Unix)

# pmap -x 8320
8320: /usr/local/apache2/bin/httpd -DSSL
Address Kbytes RSS Dirty Mode Mapping
0000000000400000 584 496 0 r-x-- httpd
0000000000692000 24 20 20 rw--- httpd
0000000000698000 12 8 8 rw--- [ anon ]
0000000017c10000 147640 144612 144608 rw--- [ anon ]
.....
---------------- ------ ------ ------
total kB 352380 156560 151324


# /usr/local/apache2/bin/httpd -l
Compiled in modules:
core.c
mod_authn_file.c
mod_authn_default.c
mod_authz_host.c
mod_authz_groupfile.c
mod_authz_user.c
mod_authz_default.c
mod_auth_basic.c
mod_include.c
mod_filter.c
mod_log_config.c
mod_env.c
mod_setenvif.c
mod_version.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_so.c
#


Cheers
Eugene
------=_NextPart_000_0040_01CB5F0F.6427F700
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dkoi8-r">
<META content=3D"MSHTML 6.00.6000.17080" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Greetings,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>We have a problem with huge =
Apache+mod_perl2
processes of 150-200 Mb in size. After apache restart they are usually =
40-50 Mb
in size, then in a minute grow up to 100-150 Mb and then some time =
later
may grow up to 200 Mb. I suspect a certain type of http queries and =
would
like to know if there are any manuals/howtos/tools to investiagate such
cases.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># perl -v</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>This is perl, v5.10.1 (*) built for
x86_64-linux<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2># strings =
/usr/local/apache2/modules/mod_perl.so |
grep mod_perl\/<BR>mod_perl/2.0.4<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2># /usr/local/apache2/bin/httpd =
-v<BR>Server
version: Apache/2.2.14 (Unix)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># pmap -x 8320</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>8320:   =
/usr/local/apache2/bin/httpd
-DSSL<BR>Address         &nb=
sp;
Kbytes     RSS   Dirty Mode  
Mapping<BR>0000000000400000     =
584    
496       0 r-x-- 
httpd<BR>0000000000692000     
24      20      20 =
rw--- 
httpd<BR>0000000000698000     
12       =
8       8
rw---    [ anon ]<BR>0000000017c10000  147640 
144612  144608 rw---    [ anon =
]<BR>....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>----------------  ------  =
------ 
------<BR>total kB          =

352380  156560  151324<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2># /usr/local/apache2/bin/httpd =
-l<BR>Compiled in
modules:<BR>  core.c<BR>  mod_authn_file.c<BR> 
mod_authn_default.c<BR>  mod_authz_host.c<BR> 
mod_authz_groupfile.c<BR>  mod_authz_user.c<BR> 
mod_authz_default.c<BR>  mod_auth_basic.c<BR>  =
mod_include.c<BR> 
mod_filter.c<BR>  mod_log_config.c<BR>  mod_env.c<BR> 
mod_setenvif.c<BR>  mod_version.c<BR>  prefork.c<BR> 
http_core.c<BR>  mod_mime.c<BR>  mod_status.c<BR> 
mod_autoindex.c<BR>  mod_asis.c<BR>  mod_cgi.c<BR> 
mod_negotiation.c<BR>  mod_dir.c<BR>  mod_actions.c<BR> 
mod_userdir.c<BR>  mod_alias.c<BR>  mod_rewrite.c<BR> 
mod_so.c<BR>#</DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Cheers</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Eugene</FONT></DIV></BODY></HTML>

------=_NextPart_000_0040_01CB5F0F.6427F700--
Eugene Toropov [ Di, 28 September 2010 11:16 ] [ ID #2048365 ]

Re: huge apache+mod_perl processes

Hi Eugene,

Eugene Toropov schrieb am 28.09.2010 um 13:16 (+0400):
>
> We have a problem with huge Apache+mod_perl2 processes of 150-200 Mb
> in size. After apache restart they are usually 40-50 Mb in size, then
> in a minute grow up to 100-150 Mb and then some time later may grow up
> to 200 Mb. I suspect a certain type of http queries and would like to
> know if there are any manuals/howtos/tools to investiagate such cases.

I don't know of any master tool to pinpoint the resource hog, but it
might help to think about what kind of potentially memory-hungry things
your application does.

* accumulating data in memory
* large XML docs read into memory
* SQL data not using an iterator, but accumulating in memory
* large file uploads
* ...

Are you able to reproduce the issue in your dev environment (where I
presume clicks are under control)? Then you might be able to determine
the handler that gobbles up memory.

I've also seen situations (with bad code) where memory consumption
depended on the data available for a process to read.

Hope this helps.
--
Michael Ludwig
Michael Ludwig [ Mo, 04 Oktober 2010 20:13 ] [ ID #2048419 ]
Webserver » gmane.comp.apache.mod-perl » huge apache+mod_perl processes

Vorheriges Thema: Secure web
Nächstes Thema: Transfer-Encoding: chunked in requests