Getting the error "mysqld invoked oom-killer".
Issue
-
mysql db restarting every few hours
-
logs contain these messages
Sep 12 20:27:23 localhost kernel: mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
Sep 12 20:27:23 localhost kernel: mysqld cpuset=/ mems_allowed=0
Sep 12 20:27:23 localhost kernel: Pid: 10646, comm: mysqld Not tainted 2.6.32-279.19.1.el6.x86_64 #1
Sep 12 20:27:23 localhost kernel: Call Trace:
Sep 12 20:27:23 localhost kernel: [<ffffffff810c29e1>] ? cpuset_print_task_mems_allowed+0x91/0xb0
Sep 12 20:27:23 localhost kernel: [<ffffffff81112d40>] ? dump_header+0x90/0x1b0
Sep 12 20:27:23 localhost kernel: [<ffffffff8120dfec>] ? security_real_capable_noaudit+0x3c/0x70
Sep 12 20:27:23 localhost kernel: [<ffffffff811131c2>] ? oom_kill_process+0x82/0x2a0
Sep 12 20:27:23 localhost kernel: [<ffffffff81113101>] ? select_bad_process+0xe1/0x120
Sep 12 20:27:23 localhost kernel: [<ffffffff81113600>] ? out_of_memory+0x220/0x3c0
Sep 12 20:27:23 localhost kernel: [<ffffffff8112331e>] ? __alloc_pages_nodemask+0x89e/0x940
Sep 12 20:27:23 localhost kernel: [<ffffffff811574ea>] ? alloc_pages_current+0xaa/0x110
Sep 12 20:27:23 localhost kernel: [<ffffffff811101c7>] ? __page_cache_alloc+0x87/0x90
Sep 12 20:27:23 localhost kernel: [<ffffffff814ec71b>] ? _spin_unlock_bh+0x1b/0x20
Sep 12 20:27:23 localhost kernel: [<ffffffff81125cfb>] ? __do_page_cache_readahead+0xdb/0x210
Sep 12 20:27:23 localhost kernel: [<ffffffff81125e51>] ? ra_submit+0x21/0x30
Sep 12 20:27:23 localhost kernel: [<ffffffff811114f3>] ? filemap_fault+0x4c3/0x500
Sep 12 20:27:23 localhost kernel: [<ffffffff8113a754>] ? __do_fault+0x54/0x510
Sep 12 20:27:23 localhost kernel: [<ffffffff814191b9>] ? sock_common_recvmsg+0x39/0x50
Sep 12 20:27:23 localhost kernel: [<ffffffff8113ad07>] ? handle_pte_fault+0xf7/0xb50
Sep 12 20:27:23 localhost kernel: [<ffffffff81090990>] ? autoremove_wake_function+0x0/0x40
Sep 12 20:27:23 localhost kernel: [<ffffffff8113b99a>] ? handle_mm_fault+0x23a/0x310
Sep 12 20:27:23 localhost kernel: [<ffffffff8113e0c6>] ? find_vma+0x46/0x80
Sep 12 20:27:23 localhost kernel: [<ffffffff810432d9>] ? __do_page_fault+0x139/0x480
Sep 12 20:27:23 localhost kernel: [<ffffffff814189ab>] ? sys_recvfrom+0x16b/0x180
Sep 12 20:27:23 localhost kernel: [<ffffffff8105fa40>] ? default_wake_function+0x0/0x20
Sep 12 20:27:23 localhost kernel: [<ffffffff814ef68e>] ? do_page_fault+0x3e/0xa0
Sep 12 20:27:23 localhost kernel: [<ffffffff814eca45>] ? page_fault+0x25/0x30
Sep 12 23:36:23 localhost kernel: Out of memory: Kill process 10048 (mysqld) score 814 or sacrifice child
Sep 12 23:36:23 localhost kernel: Killed process 10048, UID 1103, (mysqld) total-vm:59256564kB, anon-rss:30307628kB, file-rss:528kB
Environment
-
Red Hat Enterprise Linux 6.3
-
mysql version 5.6.12
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.