Bill Marrs wrote: > I'm a heavy mod_perl user, running 3 sites as virtual servers, all with > lots of custom Perl code. My httpd's are huge(~50mb), but with the help > of a startup file I'm able to get them sharing most of their > memory(~43). With the help of GTopLimit, I'm able to keep the memory > usage under control. > > But... recently, something happened, and things have changed. After > some random amount of time (1 to 40 minutes or so, under load), the > parent httpd suddenly loses about 7-10mb of share between it and any new > child it spawns. As you can imagine, the memory footprint of my httpds > skyrockets and the delicate balance I set up is disturbed. Also, > GTopLimit is no help in this case - it actually causes flailing because > each new child starts with memory sharing that is out of bounds and is > thus killed very quickly. > > Restarting Apache resets the memory usage and restores the server to > smooth operation. Until, it happens again. > > Using GTop() to get the shared memory of each child before and after > running my perl for each page load showed that it wasn't my code causing > the jump, but suddenly the child, after having a good amount of shared > memory in use, loses a 10MB chunk and from then on the other children > follow suit. > > So, something I did on the server (I'm always doing stuff!) has caused > this change to happen, but I've been pulling my hair out for days trying > to track it down. I am now getting desperate. One of the recent things > I did was to run "tux" (another web server) to serve my images, but I > don't see how that could have any effect on this. > > If anyone has any ideas what might cause the httpd parent (and new > children) to lose a big chunk of shared memory between them, please let > me know.
I assume that you are on linux (tux :). look at the output of 'free' -- how much swap is used before you start the server and when the horrors begin? Your delicate ballance could be ruined when the system starts to swap and the load doesn't go away. Therefore what you see is normal. Notice that it's possible that you didn't add a single line of code to your webserver, but updated some other app running on the same machine which started to use more memory, and that takes the ballance off. Hope that my guess was right. If so make sure that your system never swaps. Swap is for emergency short term extra memory requirement, not for normal operation. _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/