Re: Memory usage
"Brady Bellinger" <[email protected]> Fri, 22 Feb 2008 08:43:16 -0500
| Newsgroups | gmane.comp.apache.mod-layout |
|---|---|
| Message-ID | <[email protected]> |
You may also wish to set the MaxRequestsPerChild to a low value like 50 (or lower depending how much memory you have). This will cause the child to die after 50 "serves"....note this does not count keepalive requests, though. Brady On Fri, Feb 22, 2008 at 3:30 AM, Olivier Nicaise <[email protected]> wrote: > With the same versions of apache, php and mod_layout, I got the same > results, and sometimes It makes my server crash due to high memory > usage, it isv ery annoying. I put a script on my server which kills > apache processes with more than 100 MB to avoid crashes. > > Le 22-f=E9vr.-08 =E0 05:36, Con Tassios a =E9crit : > > > > > Further to some emails to this list in Dec 2007 titled "mod_layout 5 > > memory > > leak", the following PHP code demonstrates how memory usage of > > Apache processes > > can increase enormously when mod_layout is used on PHP generated > > output. > > > > Apache 2.2.8 > > PHP 5.2.5 > > mod_layout 5.1 and version from hg.tangent.org > > > > Apache configuration: > > > > AddOutputFilterByType LAYOUT text/html > > LayoutFooter "<p> FOOTER<p>" > > LayoutHeader "<p> HEADER<p>" > > > > > > test1.php: > > > > <html> > > <head> > > </head> > > <body> > > <? for ($i=3D0; $i<=3D20000; $i++) { > > printf("[%d] > > abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$% > > %^&*()<br>\n", $i); > > } > > ?> > > </body> > > </html> > > > > > > Output from the above scripts generated is about 1.6MB. On my > > system, Apache > > process grows to about 1GB after a few accesses of the page. The > > same results > > when PHP is run as an Apache module or run as a CGI. > > > > A plain HTML file containing the same contents as the PHP generated > > output, > > shows no increased memory usage in the Apache processes. > > > > _______________________________________________ > > Mod_layout mailing list > > [email protected] > > http://lists.tangent.org/mailman/listinfo/mod_layout > > _______________________________________________ > Mod_layout mailing list > [email protected] > http://lists.tangent.org/mailman/listinfo/mod_layout > -- = ---------------------------------------------- brady at bradybellinger dot com