The MU forums have moved to WordPress.org

Memory Leak Troubleshooting Help (12 posts)

  1. johnnytee
    Member
    Posted 14 years ago #

    We have a a dedicated server with 1GB of ram running WPMU 2.8.6. It has 300 blogs on it and gets about 500 uniques a day.

    I'm having an issue with it running out of memory about every week now. As soon as I reload httpd it runs it's ram up to 950MB in 5 minutes. Any ideas on how to trouble shoot this. Do I just start disable plugins 1 by 1? Or should I just disable every plugin and start turning them on 1 by 1. Any ideas or help is greatly appreciated.

  2. SteveAtty
    Member
    Posted 14 years ago #

    Is this apache?

    Is it a windows box?

    What mpm are you using ?

    When a PHP script finishes running it should release its memory. So if apache is ramping up and not releasing it then it could be something like your apache worker configuration.

  3. andrea_r
    Moderator
    Posted 14 years ago #

    Could be a plugin too tho.

    Altho I was thinking worker threads... there's some good snippets for tweaking in (of all places) Media Temple's knowledge base.

    You could do that *and* comb over the plugins.

  4. SteveAtty
    Member
    Posted 14 years ago #

    If it is a leaky plugin then setting the max number of request per worker before it re-starts (MaxRequestsPerChild) could reduce the impact of the leak.

  5. johnnytee
    Member
    Posted 14 years ago #

    thx for the replies

    I'll check into worker threads and apache config, we are running it on rh5 with se linux. I need to check the apache version.

    I disabled all plugins and issue is still occurring. It must me apache config issue.

  6. SteveAtty
    Member
    Posted 14 years ago #

    When you say it ramps up to 950MB - where are you getting those figures from?

  7. johnnytee
    Member
    Posted 14 years ago #

    I'm running 'top' to see the usage. Here's a screenshot http://www.flickr.com/photos/johnturner/4273547961/

    Here's my server set up:
    Server version: Apache/2.2.3
    Server built: Nov 10 2009 09:06:10
    [root@blogs conf]# httpd -V
    Server version: Apache/2.2.3
    Server built: Nov 10 2009 09:06:10
    Server's Module Magic Number: 20051115:3
    Server loaded: APR 1.2.7, APR-Util 1.2.7
    Compiled using: APR 1.2.7, APR-Util 1.2.7
    Architecture: 64-bit
    Server MPM: Prefork
    threaded: no
    forked: yes (variable process count)
    Server compiled with....
    -D APACHE_MPM_DIR="server/mpm/prefork"
    -D APR_HAS_SENDFILE
    -D APR_HAS_MMAP
    -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
    -D APR_USE_SYSVSEM_SERIALIZE
    -D APR_USE_PTHREAD_SERIALIZE
    -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
    -D APR_HAS_OTHER_CHILD
    -D AP_HAVE_RELIABLE_PIPED_LOGS
    -D DYNAMIC_MODULE_LIMIT=128
    -D HTTPD_ROOT="/etc/httpd"
    -D SUEXEC_BIN="/usr/sbin/suexec"
    -D DEFAULT_PIDLOG="logs/httpd.pid"
    -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
    -D DEFAULT_LOCKFILE="logs/accept.lock"
    -D DEFAULT_ERRORLOG="logs/error_log"
    -D AP_TYPES_CONFIG_FILE="conf/mime.types"
    -D SERVER_CONFIG_FILE="conf/httpd.conf"

    <IfModule prefork.c>
    StartServers 8
    MinSpareServers 5
    MaxSpareServers 20
    ServerLimit 256
    MaxClients 256
    MaxRequestsPerChild 4000
    </IfModule>

    <IfModule worker.c>
    StartServers 2
    MaxClients 150
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild 25
    MaxRequestsPerChild 0
    </IfModule>

  8. SteveAtty
    Member
    Posted 14 years ago #

    So you've got 16 httpd processes running (so I suspect you're running pre-forked). Each process is taking 4% of memory, occupying 5MB of Shared memory, about 42MB of reserved memory (i.e. memory that it can't be swapped out of) and about 249MB of virtual memory.

    I can't see what the problem is - my server looks pretty much the same.

    If nothing is using that memory, or needs that memory (and your very low use of swap would indicate you've not hit that point) then there isn't anything to worry about.

    Heres a snapshot of mine:

    http://www.tty.org.uk/apache.png

    The swap usage on mine is because my brother compiles his website code on there.

  9. johnnytee
    Member
    Posted 14 years ago #

    @SteveAtty thx for the screenshot and for verifying my server set up. The server runs on a vm cluster here at the college I work for. I'll start exploring a vm issue now. I though it was on a dedicated.

  10. SteveAtty
    Member
    Posted 14 years ago #

    You could try backing down the maxrequests to 1000. It does mean that processes get killed off a little more often but any possibility of a memory leak is reduced. I did that when I was troubleshooting a problem with the latest eaccelerator build.

  11. johnnytee
    Member
    Posted 14 years ago #

    ok thx I'll try that and see the result

  12. windhamdavid
    Member
    Posted 14 years ago #

    /var/log/httpd/error_log ~ it's always best to start blaming the NOC first, then tell them you want your own box!

About this Topic

  • Started 14 years ago by johnnytee
  • Latest reply from windhamdavid