[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Why would my server be swapping... (thinking about a new subject line)

On Thu, 14 Oct 2004 18:04:12 +0100, James Wilkinson
<james westexe demon co uk> wrote:
> Wouter van Vliet wrote:
> ( .. )
> James.

Ok, those were a lot of ideas. Thanks for all of them. I'm currently
trying to fix a pretty ugly bug problem on my webshop. I've identified
the problem as being a little greedy with memory. It consumes a lot,
and doesn't give it all back when it should. So, and I just found this
out, the amount of free memory decreases slowly.

`ps wfaux` tells shows me 20 procs with the "/usr/sbin/-e" command,
hanging under root's httpd each consuming 4.4% mem (abt 30MB). And the
same amount of postgres procs, each with 1.1% (just over 10MB). What
whould this /usr/sbin/-e command be?

That's when apache's been working for a while, when I've done a
restart there's the same list of 20 procs under httpd, only now their
command is /usr/sbin/httpd, changing to the -e variant after having
served a request.

Probably there's some kind of memory leak in my perl files (running
under mod_perl) which I can't find. To catch it I've now set the
MaxRequestsPerChild directive quite now (3), to make sure the procs
end soon enough and give their leaked memory back. Of course this is
not the best way to take care of things, but right now the most
important thing is to keep the site running.

(hmm, drifting off from the swapping thing; you guys think I should
take this over to the Apache or ModPerl mailinglist or would anyone
around here know some cool techniques to find leaks in Perl code?)

Well, anyway - the load peak I mentioned happened when I had not yet
noticed there was memory drifting off. Probably after all RAM was used
it started to really swap, used up all swap space and then the load
peaked to some unknown value. The value of 70 I mentioned was after a
night, and at night ppl sleep and don't shop online. Imagine what it
has recovered from.

(the used swap space is still at 147)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]