LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 08-12-2005, 05:50 AM   #1
guarriman
Member
 
Registered: Nov 2004
Posts: 101

Rep: Reputation: 15
kernel: Out of Memory: Killed process


Hi.

Using Fedora Core 2:
Linux myserver.com 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686 i686 i386 GNU/Linux

I've got installed 'Apache 2.0.52' and 'MySQL 4.1.9'.

I've noticed this morning MySQL daemon was stopped and I've read '/var/log/messages':
Aug 12 02:07:03 myserver kernel: Out of Memory: Killed process 547 (mysqld).
Aug 12 02:17:15 myserver kernel: Out of Memory: Killed process 548 (mysqld).
Aug 12 02:21:00 myserver kernel: Out of Memory: Killed process 549 (mysqld).
Aug 12 02:21:52 myserver kernel: Out of Memory: Killed process 550 (mysqld).
Aug 12 02:22:38 myserver kernel: Out of Memory: Killed process 551 (mysqld).
Aug 12 02:23:59 myserver kernel: Out of Memory: Killed process 552 (mysqld).
Aug 12 02:25:54 myserver kernel: Out of Memory: Killed process 553 (mysqld).


[]# top
Tasks: 107 total, 2 running, 105 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.3% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 508072k total, 479852k used, 28220k free, 96616k buffers
Swap: 1084376k total, 21492k used, 1062884k free, 65044k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26112 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.19 mysqld
26113 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.11 mysqld
26114 mysql 20 0 71680 25m 6172 S 0.0 5.1 0:00.00 mysqld
26115 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.00 mysqld
26116 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.00 mysqld
26117 mysql 20 0 71680 25m 6172 S 0.0 5.1 0:00.00 mysqld
26118 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.00 mysqld
26119 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.00 mysqld
26120 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.00 mysqld
26121 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.01 mysqld
26847 mysql 16 0 71680 25m 6172 S 0.0 5.1 0:00.00 mysqld
26595 apache 15 0 33028 23m 16m S 0.0 4.8 0:03.80 httpd
26271 apache 15 0 33108 23m 16m S 0.0 4.8 0:07.40 httpd
26043 apache 16 0 32724 23m 16m S 0.0 4.7 0:09.06 httpd
26040 apache 15 0 32748 23m 16m S 0.0 4.7 0:09.67 httpd
26045 apache 15 0 32688 23m 16m S 0.0 4.7 0:08.92 httpd
26338 apache 15 0 32440 23m 16m S 0.0 4.7 0:08.33 httpd
26046 apache 15 0 32576 23m 16m S 0.0 4.7 0:08.74 httpd
26039 apache 15 0 32372 23m 16m S 0.0 4.7 0:08.66 httpd
26143 apache 16 0 32456 23m 16m S 0.0 4.7 0:08.46 httpd
26360 apache 16 0 32652 23m 16m S 0.0 4.6 0:06.18 httpd
26041 apache 16 0 32440 23m 16m S 0.0 4.6 0:10.75 httpd
26044 apache 15 0 32420 22m 16m S 0.0 4.6 0:10.25 httpd
26042 apache 15 0 32432 22m 16m S 0.0 4.6 0:09.26 httpd
26394 apache 15 0 32380 22m 16m S 0.0 4.6 0:05.22 httpd
27025 apache 15 0 31420 21m 16m S 0.0 4.4 0:02.16 httpd

[]# cat /proc/meminfo
MemTotal: 508072 kB
MemFree: 72428 kB
Buffers: 37392 kB
Cached: 99080 kB
SwapCached: 18292 kB
Active: 326536 kB
Inactive: 80968 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 508072 kB
LowFree: 72428 kB
SwapTotal: 1084376 kB
SwapFree: 1058176 kB
Dirty: 84 kB
Writeback: 0 kB
Mapped: 269244 kB
Slab: 22948 kB
Committed_AS: 496572 kB
PageTables: 2256 kB
VmallocTotal: 3620856 kB
VmallocUsed: 2484 kB
VmallocChunk: 3617784 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 4096 kB


I've got some doubts:
1) Why are there 11 mysqld proccesses?
2) Why are there 15 httpd proccesses?
3) How can avoid this issue?

Thank you very much.
 
Old 08-13-2005, 05:14 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
I am very much a mysql newbie but came across this recently while setting up queries and found that this can be caused by failing to close the connection after a query. If you are using php then you need to check that that the connection to the database is being closed else the queries stay open and uses all the memory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Out of Memory: Killed process maenho Linux - Software 3 10-16-2005 06:06 AM
how to prevent process from being killed? iclinux Linux - Newbie 7 01-14-2005 11:43 PM
kernel: Out of Memory: Killed process amitch3 Linux - Enterprise 5 08-20-2004 03:24 AM
Killed Process Problem chr Slackware 2 05-06-2003 02:33 AM
process is getting killed automatically chens_83 Linux - General 2 09-16-2002 04:52 AM


All times are GMT -5. The time now is 04:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration