V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
xiaoguixp
V2EX  ›  VPS

VPS 杀掉我的进程,能帮忙看看正常吗?

  •  
  •   xiaoguixp · 2016-07-31 21:46:29 +08:00 · 286 次点击
    这是一个创建于 3031 天前的主题,其中的信息可能已经有所发展或是发生改变。

    买了个 128MB 的 VPS ,用于 SS 。可是经常被杀掉进程,后来装了个 Supervisor 来守护 SS ,就变成了 Supervisor 进程被杀掉。 我查了一下 /var/log/kern.log ,发现下面的 log 。看起来 Supervisor 所占内存不多,只有 13MB (4KB * 3395=13MB),甚至比 syslogd 要少,但为什么也会被杀掉呢? 这情况正常吗?

    Jul 31 19:41:31 virmachqc kernel: [22550.116133] supervisord invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0, oom_score_adj=0

    Jul 31 19:41:31 virmachqc kernel: [22550.116139] supervisord cpuset=/ mems_allowed=0

    Jul 31 19:41:31 virmachqc kernel: [22550.116143] Pid: 2007, comm: supervisord Tainted: P O 3.2.0-4-686-pae #1 Debian 3.2.81-1

    Jul 31 19:41:31 virmachqc kernel: [22550.116146] Call Trace:

    Jul 31 19:41:31 virmachqc kernel: [22550.116157] [<c109979c>] ? dump_header.isra.6+0x5c/0x170

    Jul 31 19:41:31 virmachqc kernel: [22550.116164] [<c1124738>] ? security_real_capable_noaudit+0x2c/0x35

    Jul 31 19:41:31 virmachqc kernel: [22550.116171] [<c12c7d96>] ? _raw_spin_unlock_irqrestore+0xb/0xc

    Jul 31 19:41:31 virmachqc kernel: [22550.116175] [<c1099a26>] ? oom_kill_process+0x30/0x1fe

    Jul 31 19:41:31 virmachqc kernel: [22550.116179] [<c1099c9f>] ? select_bad_process.constprop.12+0xab/0xff

    Jul 31 19:41:31 virmachqc kernel: [22550.116183] [<c1099f70>] ? out_of_memory+0xf8/0x135

    Jul 31 19:41:31 virmachqc kernel: [22550.116188] [<c109cafa>] ? __alloc_pages_nodemask+0x50a/0x654

    Jul 31 19:41:31 virmachqc kernel: [22550.116205] [<c10c8527>] ? mem_cgroup_update_page_stat+0x10/0x9b

    Jul 31 19:41:31 virmachqc kernel: [22550.116211] [<c10ba3a7>] ? read_swap_cache_async+0x45/0xce

    Jul 31 19:41:31 virmachqc kernel: [22550.116215] [<c10ba473>] ? swapin_readahead+0x43/0x74

    Jul 31 19:41:31 virmachqc kernel: [22550.116221] [<c10af66b>] ? handle_pte_fault+0x424/0x8fd

    Jul 31 19:41:31 virmachqc kernel: [22550.116228] [<c10294bb>] ? kmap_atomic_prot+0x2f/0xe0

    Jul 31 19:41:31 virmachqc kernel: [22550.116232] [<c10afda8>] ? handle_mm_fault+0x1e8/0x1fe

    Jul 31 19:41:31 virmachqc kernel: [22550.116238] [<c12cacd2>] ? do_page_fault+0x342/0x35e

    Jul 31 19:41:31 virmachqc kernel: [22550.116243] [<c103ccbb>] ? timespec_add_safe+0x22/0x47

    Jul 31 19:41:31 virmachqc kernel: [22550.116249] [<c10dbec8>] ? sys_poll+0x3b/0x81

    Jul 31 19:41:31 virmachqc kernel: [22550.116253] [<c12ca990>] ? vmalloc_fault+0x87/0x87

    Jul 31 19:41:31 virmachqc kernel: [22550.116256] [<c12c8b53>] ? error_code+0x67/0x6c

    Jul 31 19:41:31 virmachqc kernel: [22550.116259] Mem-Info:

    Jul 31 19:41:31 virmachqc kernel: [22550.116262] DMA per-cpu:

    Jul 31 19:41:31 virmachqc kernel: [22550.116264] CPU 0: hi: 0, btch: 1 usd: 0

    Jul 31 19:41:31 virmachqc kernel: [22550.116266] Normal per-cpu:

    Jul 31 19:41:31 virmachqc kernel: [22550.116269] CPU 0: hi: 42, btch: 7 usd: 0

    Jul 31 19:41:31 virmachqc kernel: [22550.116274] active_anon:57 inactive_anon:67 isolated_anon:0

    Jul 31 19:41:31 virmachqc kernel: [22550.116276] active_file:9 inactive_file:0 isolated_file:0

    Jul 31 19:41:31 virmachqc kernel: [22550.116277] unevictable:0 dirty:0 writeback:70 unstable:0

    Jul 31 19:41:31 virmachqc kernel: [22550.116278] free:251 slab_reclaimable:528 slab_unreclaimable:21342

    Jul 31 19:41:31 virmachqc kernel: [22550.116280] mapped:3 shmem:0 pagetables:123 bounce:0

    Jul 31 19:41:31 virmachqc kernel: [22550.116289] DMA free:520kB min:172kB low:212kB high:256kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15796kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:88kB slab_unreclaimable:15184kB kernel_stack:16kB pagetables:40kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes

    Jul 31 19:41:31 virmachqc kernel: [22550.116296] lowmem_reserve[]: 0 111 111 111

    Jul 31 19:41:31 virmachqc kernel: [22550.116306] Normal free:484kB min:1260kB low:1572kB high:1888kB active_anon:228kB inactive_anon:268kB active_file:36kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:113780kB mlocked:0kB dirty:0kB writeback:280kB mapped:12kB shmem:0kB slab_reclaimable:2024kB slab_unreclaimable:70184kB kernel_stack:424kB pagetables:452kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:145793 all_unreclaimable? yes

    Jul 31 19:41:31 virmachqc kernel: [22550.116312] lowmem_reserve[]: 0 0 0 0

    Jul 31 19:41:31 virmachqc kernel: [22550.116316] DMA: 24kB 08kB 016kB 032kB064kB 0128kB 0256kB 1512kB 01024kB 02048kB 0*4096kB = 520kB

    Jul 31 19:41:31 virmachqc kernel: [22550.116326] Normal: 94kB 08kB 016kB 032kB 164kB 1128kB 1256kB 0512kB 01024kB 02048kB 0*4096kB = 484kB

    Jul 31 19:41:31 virmachqc kernel: [22550.116334] 86 total pagecache pages

    Jul 31 19:41:31 virmachqc kernel: [22550.116336] 74 pages in swap cache

    Jul 31 19:41:31 virmachqc kernel: [22550.116339] Swap cache stats: add 6394, delete 6320, find 545/705

    Jul 31 19:41:31 virmachqc kernel: [22550.116341] Free swap = 115568kB

    Jul 31 19:41:31 virmachqc kernel: [22550.116343] Total swap = 131068kB

    Jul 31 19:41:31 virmachqc kernel: [22550.116773] 32749 pages RAM

    Jul 31 19:41:31 virmachqc kernel: [22550.116776] 0 pages HighMem

    Jul 31 19:41:31 virmachqc kernel: [22550.116777] 1607 pages reserved

    Jul 31 19:41:31 virmachqc kernel: [22550.116778] 51 pages shared

    Jul 31 19:41:31 virmachqc kernel: [22550.116780] 30714 pages non-shared

    Jul 31 19:41:31 virmachqc kernel: [22550.116782] [ pid ] uid tgid total_vm rss cpu oom_adj oom_score_adj name

    Jul 31 19:41:31 virmachqc kernel: [22550.116788] [ 311] 0 311 693 0 0 -17 -1000 udevd

    Jul 31 19:41:31 virmachqc kernel: [22550.116793] [ 440] 0 440 692 1 0 -17 -1000 udevd

    Jul 31 19:41:31 virmachqc kernel: [22550.116796] [ 441] 0 441 692 1 0 -17 -1000 udevd

    Jul 31 19:41:31 virmachqc kernel: [22550.116800] [ 1829] 0 1829 7246 0 0 0 0 rsyslogd

    Jul 31 19:41:31 virmachqc kernel: [22550.116804] [ 1910] 0 1910 282 0 0 0 0 acce-3.10.61.0-

    Jul 31 19:41:31 virmachqc kernel: [22550.116807] [ 1936] 0 1936 957 1 0 0 0 cron

    Jul 31 19:41:31 virmachqc kernel: [22550.116811] [ 1954] 0 1954 474 0 0 0 0 acpid

    Jul 31 19:41:31 virmachqc kernel: [22550.116815] [ 1987] 0 1987 1622 1 0 -17 -1000 sshd

    Jul 31 19:41:31 virmachqc kernel: [22550.116818] [ 2007] 0 2007 3395 2 0 0 0 supervisord

    Jul 31 19:41:31 virmachqc kernel: [22550.116822] [ 2280] 0 2280 2323 0 0 0 0 sshd

    Jul 31 19:41:31 virmachqc kernel: [22550.116826] [ 2336] 0 2336 950 1 0 0 0 getty

    Jul 31 19:41:31 virmachqc kernel: [22550.116829] [ 2337] 0 2337 950 1 0 0 0 getty

    Jul 31 19:41:31 virmachqc kernel: [22550.116832] [ 2338] 0 2338 950 1 0 0 0 getty

    Jul 31 19:41:31 virmachqc kernel: [22550.116836] [ 2339] 0 2339 950 1 0 0 0 getty

    Jul 31 19:41:31 virmachqc kernel: [22550.116840] [ 2340] 0 2340 950 1 0 0 0 getty

    Jul 31 19:41:31 virmachqc kernel: [22550.116843] [ 2341] 0 2341 950 1 0 0 0 getty

    Jul 31 19:41:31 virmachqc kernel: [22550.116846] [ 2342] 0 2342 1184 1 0 0 0 bash

    Jul 31 19:41:31 virmachqc kernel: [22550.116849] [ 2816] 0 2816 2323 0 0 0 0 sshd

    Jul 31 19:41:31 virmachqc kernel: [22550.116853] [ 2818] 0 2818 1185 0 0 0 0 bash

    Jul 31 19:41:31 virmachqc kernel: [22550.116856] [ 2875] 0 2875 2719 31 0 0 0 ssserver

    Jul 31 19:41:31 virmachqc kernel: [22550.116860] Out of memory: Kill process 2007 (supervisord) score 23 or sacrifice child

    Jul 31 19:41:31 virmachqc kernel: [22550.117468] Killed process 2875 (ssserver) total-vm:10876kB, anon-rss:124kB, file-rss:0kB

    1 条回复    2016-08-04 02:42:44 +08:00
    62900015
        1
    62900015  
       2016-08-04 02:42:44 +08:00
    应该是 CPU 资源过高被杀的,没见过主机商根据内存来杀的, 128MB 这样的配置 CPU 必然要严格控制。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   960 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 18ms · UTC 22:48 · PVG 06:48 · LAX 14:48 · JFK 17:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.