我正在运行一个 Ubuntu 服务器,它开始出现问题。它很少使用,但我很困惑为什么它现在会出现内存问题。我包含了 syslog 和 free -m 的一些输出。这到底告诉我什么,我下一步该怎么做?谷歌搜索提供了一些模棱两可的答案。它只是一个 512MB 实例,设置了 512MB 的交换空间,内存限制为 512 MB。
提前感谢任何帮助
Jan 14 06:25:15 curren rsyslogd: [origin software="rsyslogd" swVersion="5.8.1" x-pid="2311" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jan 14 06:25:16 curren CRON[3242]: (CRON) info (No MTA installed, discarding output)
Jan 14 06:40:59 curren kernel: mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
Jan 14 06:40:59 curren kernel: mysqld cpuset=/ mems_allowed=0
Jan 14 06:40:59 curren kernel: Pid: 2414, comm: mysqld Not tainted 3.6.5-x86_64-linode28 #1
Jan 14 06:40:59 curren kernel: Call Trace:
Jan 14 06:40:59 curren kernel: [<ffffffff810c5fd6>] dump_header+0x7d/0x1af
Jan 14 06:40:59 curren kernel: [<ffffffff810a2d96>] ? delayacct_end+0x74/0x7f
Jan 14 06:40:59 curren kernel: [<ffffffff816ef5a2>] ? _raw_spin_unlock_irqrestore+0x19/0x1c
Jan 14 06:40:59 curren kernel: [<ffffffff813ad18e>] ? ___ratelimit+0xe6/0x104
Jan 14 06:40:59 curren kernel: [<ffffffff810c6372>] oom_kill_process+0x66/0x30c
Jan 14 06:40:59 curren kernel: [<ffffffff810c6822>] out_of_memory+0x20a/0x263
Jan 14 06:40:59 curren kernel: [<ffffffff810ca096>] __alloc_pages_slowpath+0x403/0x4bc
Jan 14 06:40:59 curren kernel: [<ffffffff810ca299>] __alloc_pages_nodemask+0x14a/0x1ae
Jan 14 06:40:59 curren kernel: [<ffffffff813ac0b0>] ? radix_tree_lookup+0x1e/0x54
Jan 14 06:40:59 curren kernel: [<ffffffff810f6391>] alloc_pages_current+0xc5/0xe6
Jan 14 06:40:59 curren kernel: [<ffffffff810c3afb>] __page_cache_alloc+0x87/0x94
Jan 14 06:40:59 curren kernel: [<ffffffff810c51d4>] filemap_fault+0x25a/0x341
Jan 14 06:40:59 curren kernel: [<ffffffff810e1b69>] __do_fault+0xa5/0x3a0
Jan 14 06:40:59 curren kernel: [<ffffffff810e2d03>] handle_pte_fault+0xdd/0x1b5
Jan 14 06:40:59 curren kernel: [<ffffffff81004a4c>] ? xen_pmd_val+0x9/0xb
Jan 14 06:40:59 curren kernel: [<ffffffff81004659>] ? __raw_callee_save_xen_pmd_val+0x11/0x1e
Jan 14 06:40:59 curren kernel: [<ffffffff810e2f32>] handle_mm_fault+0x157/0x169
Jan 14 06:40:59 curren kernel: [<ffffffff816f2947>] do_page_fault+0x364/0x389
Jan 14 06:40:59 curren kernel: [<ffffffff81072fd1>] ? T.800+0x15/0x3b
Jan 14 06:40:59 curren kernel: [<ffffffff81074011>] ? ktime_get_ts+0x44/0x93
Jan 14 06:40:59 curren kernel: [<ffffffff81112067>] ? poll_select_copy_remaining+0xd2/0xf6
Jan 14 06:40:59 curren kernel: [<ffffffff811122d1>] ? sys_select+0xa4/0xb9
Jan 14 06:40:59 curren kernel: [<ffffffff816efb65>] page_fault+0x25/0x30
Jan 14 06:40:59 curren kernel: Mem-Info:
Jan 14 06:40:59 curren kernel: Node 0 DMA per-cpu:
Jan 14 06:40:59 curren kernel: CPU 0: hi: 0, btch: 1 usd: 0
这是 free -m 的结果`
root@curren:/var/log# free -m
total used free shared buffers cached
Mem: 486 481 5 0 0 7
-/+ buffers/cache: 473 13
Swap: 511 507 4
root@curren:/var/log#
答案1
您的内存(和交换空间)确实用完了。
调整您的服务以使用更少的内存,或者购买具有更多内存的 VPS。