Out of Memory Errors

Discussion in 'General' started by tonysch, Jun 23, 2009.

  1. tonysch

    tonysch New Member

    I have a Ubuntu 6.04 running ispconfig2. I followed the howtoforge (Perfect Server) to the "T". There are 8 very small websites (only 2 used very seldom), almost no usage.
    I had a memory leak somewhere for almost 2 years. If left alone after about 1 week I would have to forcefully restart the server. Created a cron job to reboot the server nightly.. This temporarily resolve the issue.
    Last week I decided to upgrade my Ubuntu to 8.04... All went very well.
    Now I have a memory leak that shuts off the Apache2 service in about 15 - 60 minutes. :eek:

    I am not by any stretch of the imagination a Linux Guru... :rolleyes:

    Any help would be greatly appreciated.

    Thanks
    Tony


    I know the following will help...


    root@srv02:~# free -m
    total used free shared buffers cached
    Mem: 254 245 9 0 4 36
    -/+ buffers/cache: 204 50
    Swap: 511 179 332


    root@srv02:~# htop

    1 [|| 1.0%] Tasks: 76 total, 1 running
    2 [ 0.0%] Load average: 0.34 0.31 0.43
    3 [| 0.3%] Uptime: 00:26:26
    4 [ 0.0%]
    Mem[||||||||||||||||||||||||||||||||204/254MB]
    Swp[||||||||||||||| 179/511MB]

    PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
    3208 www-data 15 0 286M 28084 5324 S 0.0 10.8 0:02.22 /usr/sbin/apache2 -k start
    3218 www-data 16 0 281M 23072 5196 S 0.0 8.8 0:00.63 /usr/sbin/apache2 -k start
    3259 www-data 15 0 280M 22292 5148 S 0.0 8.5 0:00.43 /usr/sbin/apache2 -k start
    2894 www-data 15 0 286M 21636 4688 S 0.0 8.3 0:01.90 /usr/sbin/apache2 -k start
    3207 www-data 16 0 286M 21500 5160 S 0.0 8.2 0:01.15 /usr/sbin/apache2 -k start
    2897 www-data 15 0 281M 21496 4784 S 0.0 8.2 0:00.65 /usr/sbin/apache2 -k start
    3217 www-data 16 0 284M 19888 4748 S 0.0 7.6 0:00.62 /usr/sbin/apache2 -k start
    3192 www-data 15 0 278M 19808 4720 S 0.0 7.6 0:00.48 /usr/sbin/apache2 -k start
    3717 www-data 16 0 274M 18864 5156 S 0.0 7.2 0:00.60 /usr/sbin/apache2 -k start
    2187 mysql 19 0 159M 7292 2904 S 0.0 2.8 0:00.00 /usr/sbin/mysqld --basedir=/usr --datadi
    2188 mysql 16 0 159M 7292 2904 S 0.0 2.8 0:00.00 /usr/sbin/mysqld --basedir=/usr --datadi
    2189 mysql 17 0 159M 7292 2904 S 0.0 2.8 0:00.00 /usr/sbin/mysqld --basedir=/usr --datadi
    2190 mysql 20 0 159M 7292 2904 S 0.0 2.8 0:00.00 /usr/sbin/mysqld --basedir=/usr --datadi
    2202 mysql 16 0 159M 7292 2904 S 0.0 2.8 0:00.02 /usr/sbin/mysqld --basedir=/usr --datadi
    2203 mysql 16 0 159M 7292 2904 S 0.0 2.8 0:00.01 /usr/sbin/mysqld --basedir=/usr --datadi
    2204 mysql 16 0 159M 7292 2904 S 0.0 2.8 0:00.00 /usr/sbin/mysqld --basedir=/usr --datadi
    2205 mysql 16 0 159M 7292 2904 S 0.0 2.8 0:00.08 /usr/sbin/mysqld --basedir=/usr --datadi
    2174 mysql 15 0 159M 7292 2904 S 0.0 2.8 0:00.82 /usr/sbin/mysqld --basedir=/usr --datadi
    3209 www-data 15 0 270M 5268 3088 S 0.0 2.0 0:00.15 /usr/sbin/apache2 -k start
    2877 root 16 0 264M 2944 2424 S 0.0 1.1 0:00.19 /usr/sbin/apache2 -k start
    2981 postfix 16 0 39328 2040 1316 S 0.0 0.8 0:00.28 qmgr -l -t fifo -u
    2988 postfix 16 0 41636 1980 1488 S 0.0 0.8 0:00.18 tlsmgr -l -t unix -u -c
    3049 bind 15 0 68132 1704 1172 S 0.0 0.7 0:00.02 /usr/sbin/named -u bind -t /var/lib/name
    3050 bind 15 0 68132 1704 1172 S 0.0 0.7 0:00.00 /usr/sbin/named -u bind -t /var/lib/name
    3051 bind 16 0 68132 1704 1172 S 0.0 0.7 0:00.00 /usr/sbin/named -u bind -t /var/lib/name
    3048 bind 25 0 68132 1704 1172 S 0.0 0.7 0:00.03 /usr/sbin/named -u bind -t /var/lib/name
    3140 root 16 0 68104 1404 1272 S 0.0 0.5 0:00.37 sshd: root@pts/1
    3124 root 16 0 68100 1396 1272 S 0.0 0.5 0:00.01 sshd: root@pts/0
    3892 root 16 0 19388 1376 988 R 0.3 0.5 0:00.10 htop
    3128 root 16 0 17624 1364 1084 S 0.0 0.5 0:00.00 -bash
    2982 postfix 16 0 38728 1336 1232 S 0.0 0.5 0:00.01 pickup -l -t fifo -u -c
    3104 root 16 0 61036 1328 836 S 0.0 0.5 0:00.00 /usr/bin/perl /usr/share/webmin/miniserv
    2977 root 16 0 36676 1316 1196 S 0.0 0.5 0:00.35 /usr/lib/postfix/master
    3144 root 15 0 17620 1272 1072 S 0.0 0.5 0:00.01 -bash
    3159 root 15 0 67960 1272 1268 S 0.0 0.5 0:00.01 sshd: root@pts/2
    2648 root 16 0 51508 1044 1016 S 0.0 0.4 0:00.03 /root/ispconfig/httpd/bin/ispconfig_http
    1592 ntp 14 -2 23352 996 852 S 0.0 0.4 0:00.01 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 1
    2649 root 16 0 17352 968 836 S 0.0 0.4 0:00.01 /bin/bash /root/ispconfig/sv/ispconfig_w
    3163 root 15 0 17636 896 892 S 0.0 0.3 0:00.01 -bash
    2132 root 22 0 17380 848 844 S 0.0 0.3 0:00.01 /bin/sh /usr/bin/mysqld_safe
    1907 syslog 16 0 12288 696 548 S 0.0 0.3 0:00.06 /sbin/syslogd -a /var/lib/named/dev/log
    2033 root 17 0 26992 696 536 S 0.0 0.3 0:00.00 /usr/lib/courier/courier-authlib/authdae
    2032 root 16 0 26992 664 504 S 0.0 0.3 0:00.00 /usr/lib/courier/courier-authlib/authdae
    2569 root 16 0 18608 648 548 S 0.0 0.2 0:00.00 /usr/sbin/cron
    3081 nobody 16 0 110M 596 480 S 0.0 0.2 0:00.00 proftpd: (accepting connections)
    F1Help F2Setup F3SearchF4InvertF5Tree F6SortByF7Nice -F8Nice +F9Kill F10Quit
     
  2. Ben

    Ben Active Member Moderator

    To be honest your machine is just undersized. Not only the physical RAM, also the swap is too small. AS you can see ram is about to be full and even swap-space is not much left.

    So imho solutions are to size up the physicacal memory, or lower max threads for the apache as well as memory usage of mysql as those processes might the most memory intensive ones.
     
  3. tonysch

    tonysch New Member

    Let me ask you this...

    What are the specs for a base ISPconfig server running Ubuntu?
    -2 websites with little usage


    Thanks
     
  4. id10t

    id10t Member

    Here's my free output - its a linode.com machine (smallest they offer)

    Code:
    $ free
                 total       used       free     shared    buffers     cached
    Mem:        368856     271756      97100          0      39060     111120
    -/+ buffers/cache:     121576     247280
    Swap:       262136         56     262080
    
    As you can see, it really doesn't use much. Only connection at the moment is my ssh connection in to do this...
     
  5. tonysch

    tonysch New Member

    What would you suggest for a config on linode?
    ISPconfig 2 or 3 on Ubuntu 9.04 64bit?

    Thanks
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    How much ram does your vserver has?
     
  7. id10t

    id10t Member

    I'm using lenny w/ ispconfig2 on 2 different linodes (small ones) w/ no issue. Have also done same set up on a slightly larger linode.

     

Share This Page