HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   Out of memory errors (http://www.howtoforge.com/forums/showthread.php?t=29914)

pan69 1st January 2009 00:05

Out of memory errors
 
Hi. I've installed ISPConfig 3.0.0.8 RC1 on a Ubuntu 8.04 256Mb server, which worked fine. However, after a couple of days I noticed that my server was down. I rebooted and I just noticed (about 2 days after reboot), lots of these fellows:
Code:

[ 4186.930413] Out of memory: kill process 3774 (mysqld_safe) score 154236 or a child                                 
[ 4186.930555] Killed process 3816 (mysqld)                                                                           
[ 4351.569215] Out of memory: kill process 6321 (mysqld) score 55829 or a child                                       
[ 4351.569462] Killed process 6321 (mysqld)                                                                           
[ 4351.599253] Out of memory: kill process 6330 (mysqld) score 55829 or a child                                       
[ 4351.599508] Killed process 6330 (mysqld)                                                                           
[12782.688711] Out of memory: kill process 4614 (apache2) score 49498 or a child                                       
[12782.688836] Killed process 4614 (apache2)                                                                           
[12786.362634] Out of memory: kill process 4636 (apache2) score 49491 or a child                                       
[12786.362808] Killed process 4636 (apache2)                                                                           
[12771.442235] Out of memory: kill process 4635 (apache2) score 49427 or a child                                       
[12771.442370] Killed process 4635 (apache2)                                                                           
[22945.837958] Out of memory: kill process 4545 (apache2) score 24684 or a child                                       
[22945.838084] Killed process 4545 (apache2)                                                                           
[73782.719071] Out of memory: kill process 21364 (apache2) score 49215 or a child                                     
[73782.719294] Killed process 21364 (apache2)                                                                         
[73870.614930] Out of memory: kill process 21366 (apache2) score 49153 or a child                                     
[73870.615115] Killed process 21366 (apache2)                                                                         
[73865.240487] Out of memory: kill process 21355 (apache2) score 49149 or a child                                     
[73865.240695] Killed process 21355 (apache2)

Any help very much appreciated.

falko 1st January 2009 11:34

You're running out of memory.
What's the output of
Code:

free
?

pan69 2nd January 2009 03:48

I had to do another reboot because it crashed again. Right after reboot I did a 'free -m':
Code:

            total      used      free    shared    buffers    cached
Mem:          256        252          3          0          1        18
-/+ buffers/cache:        232        23
Swap:          511        59        452

Not much left is there? I'm not sure what the ISPConfig specs are concerning memory but I figured that 256M should be sufficient for a simple server running a couple of minor sites...

till 2nd January 2009 06:20

ISPConfig has no extra specs for memory usage as ispconfig itself does not use much memory, maybe about 20 - 30 MB.

Quote:

but I figured that 256M should be sufficient for a simple server running a couple of minor sites
That depends on the usage of the sites. 256 is really low and as you see you are getting out of memory errors, so its too low for your current setup. Does your server ahs a swap file or is it a vserver so no swap is allowed?

till 2nd January 2009 06:20

ISPConfig has no specs for memory usage as ispconfig itself does not use much memory, maybe about 20 - 30 MB.

Quote:

but I figured that 256M should be sufficient for a simple server running a couple of minor sites
That depends on the usage of the sites. 256 is really low and as you see you are getting out of memory errors, so its too low for your current setup. Does your server ahs a swap file or is it a vserver so no swap is allowed?

pan69 2nd January 2009 10:08

Hi. This is htop's output right after a not so graceful reboot. I've also noticed that CPU usage is increasing over time. Currently it takes about 3 hours or so for the machine to consume up to +100%, which makes it unresponsive.

I currently have only one site running on this configuration which is nothing more than just a holding page.

Code:

  3  [||||||                  18.7%]    Uptime: 00:01:43                                                             
  4  [|||||||                  20.1%]                                                                                 
  Mem[|||||||||||||||||||||223/256MB]                                                                                 
  Swp[|                      0/511MB]                                                                                 
                                                                                                                       
  PID USER    PRI  NI  VIRT  RES  SHR S CPU% MEM%  TIME+  Command                                                 
 4562 admin    20  0 19268  1292  996 R  0.0  0.5  0:00.40 htop                                                     
 3806 mysql    20  0  158M 23320  5336 S  0.0  8.9  0:00.47 /usr/sbin/mysqld -                                       
 4519 root      20  0  191M  8260  4404 S  0.0  3.1  0:00.18 /usr/sbin/apache2                                       
 3816 mysql    20  0  158M 23320  5336 S  0.0  8.9  0:00.02 /usr/sbin/mysqld -                                       
 3815 mysql    20  0  158M 23320  5336 S  0.0  8.9  0:00.02 /usr/sbin/mysqld -                                       
 3877 root      20  0  103M 44812  2472 S  0.0 17.1  0:02.26 /usr/sbin/spamd --                                       
 4566 root      20  0  122M 11736  6116 S  0.0  4.5  0:00.36 /usr/bin/php -q /u                                       
 2238 root      16  -4 16848  948  372 S  0.0  0.4  0:00.84 /sbin/udevd --daem                                       
 4581 root      20  0  102M  4800  3612 S  0.0  1.8  0:00.16 smtpd -n smtp -t i                                       
 4567 mysql    20  0  158M 23320  5336 S  0.0  8.9  0:00.10 /usr/sbin/mysqld -                                       
 4390 root      20  0 36684  2140  1684 S  0.0  0.8  0:00.04 /usr/lib/postfix/m                                       
 4607 postfix  20  0 41248  2968  2092 S  0.0  1.1  0:00.04 tlsmgr -l -t unix                                       
 4584 mysql    20  0  158M 23320  5336 S  0.0  8.9  0:00.00 /usr/sbin/mysqld -                                       
 4563 root      20  0 27152  976  728 S  0.0  0.4  0:00.00 /USR/SBIN/CRON

I've tried stopping daemon by daemon see what the results would be. Stopping MySQL, Apache and Postfix doesn't do much. However, when I killed off ClamAV I noticed over a 100Mb in memory drop. I can't seem to figure out how to stop the ISPConfig server however. Any idea's?

Thanks,
Luke

PS: This machine is a clean Ubuntu Hardy running at slicehost.com. I've followed the instructions on this page to set it up. I've added nothing else myself (except htop for CPU/mem info): http://www.ispconfig.org/docs/INSTALL_UBUNTU_8.04.txt

falko 3rd January 2009 15:31

What's in /etc/mysql/my.cnf?

pan69 4th January 2009 22:00

Quote:

Originally Posted by falko (Post 162637)
What's in /etc/mysql/my.cnf?

Hi. Sorry, I can't check any longer because I dumped the slice. If letting it alone after a reboot it would in the span of a day or so, go all the way up the 100% CPU usage. Unless I would set up an automatic reboot, it would be to much work.

The contents of my.cnf would be that of what I would get through the installation process since I've haven't touched it. Maybe the default values of it have recently changed? I dunno...

I will try to run the same installation in a virtual machine, see if I can reproduce the issue in that environment...

mozart_ar 12th April 2010 03:41

Hi,
I am experiencing this same issue. Do you found a solution? Can I do something ?

Thanks
- Walter

mozart_ar 13th April 2010 07:10

In my case, I can solve this issue changing MaxClients from 150 to 20 on apache2.conf


All times are GMT +2. The time now is 09:01.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.