简体   繁体   English

灰烬CLI构建被杀死

[英]Ember CLI build killed

I build my Ember CLI app inside a docker container on startup. 启动时,我在Docker容器中构建了Ember CLI应用程序。 The build fails without an error message, it just says killed : 构建失败,没有错误消息,它只是说killed

root@fstaging:/frontend/source# node_modules/ember-cli/bin/ember build -prod                   
version: 1.13.15
Could not find watchman, falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/user-guide/#watchman for more info.
Buildingember-auto-register-helpers is not required for Ember 2.0.0 and later please remove from your `package.json`.
Building.DEPRECATION: The `bind-attr` helper ('app/templates/components/file-selector.hbs' @ L1:C7) is deprecated in favor of HTMLBars-style bound attributes.
        at isBindAttrModifier (/app/source/bower_components/ember/ember-template-compiler.js:11751:34)
Killed

The same docker image successfully starts up in another environment, but without hardware constraints. 相同的Docker映像可在另一个环境中成功启动,但没有硬件限制。 Does Ember CLI have hard-coded hardware constraints for the build process? Ember CLI是否对构建过程具有硬编码的硬件约束? The RAM is limited to 128m and swap to 2g. RAM限制为128m,并交换为2g。

That is likely not enough memory for Ember CLI to do what it needs. Ember CLI可能没有足够的内存来执行所需的操作。 You are correct in that, the process is being killed because of an OOM situation. 您的说法是正确的,由于OOM情况,该进程已被终止。 If you log in to the host and take a look at the dmesg output you will probably see something like: 如果登录到主机并查看dmesg输出,则可能会看到类似以下内容的内容:

V8 WorkerThread invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0
V8 WorkerThread cpuset=867781e35d8a0a231ef60a272ae5d418796c45e92b5aa0233df317ce659b0032 mems_allowed=0
CPU: 0 PID: 2027 Comm: V8 WorkerThread Tainted: G           O    4.1.13-boot2docker #1
Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
 0000000000000000 00000000000000d0 ffffffff8154e053 ffff880039381000
 ffffffff8154d3f7 ffff8800395db528 ffff8800392b4528 ffff88003e214580
 ffff8800392b4000 ffff88003e217080 ffffffff81087faf ffff88003e217080
Call Trace:
 [<ffffffff8154e053>] ? dump_stack+0x40/0x50
 [<ffffffff8154d3f7>] ? dump_header.isra.10+0x8c/0x1f4
 [<ffffffff81087faf>] ? finish_task_switch+0x4c/0xda
 [<ffffffff810f46b1>] ? oom_kill_process+0x99/0x31c
 [<ffffffff811340e6>] ? task_in_mem_cgroup+0x5d/0x6a
 [<ffffffff81132ac5>] ? mem_cgroup_iter+0x1c/0x1b2
 [<ffffffff81134984>] ? mem_cgroup_oom_synchronize+0x441/0x45a
 [<ffffffff8113402f>] ? mem_cgroup_is_descendant+0x1d/0x1d
 [<ffffffff810f4d77>] ? pagefault_out_of_memory+0x17/0x91
 [<ffffffff815565d8>] ? page_fault+0x28/0x30
Task in /docker/867781e35d8a0a231ef60a272ae5d418796c45e92b5aa0233df317ce659b0032 killed as a result of limit of /docker/867781e35d8a0a231ef60a272ae5d418796c45e92b5aa0233df317ce659b0032
memory: usage 131072kB, limit 131072kB, failcnt 2284203
memory+swap: usage 262032kB, limit 262144kB, failcnt 970540
kmem: usage 0kB, limit 9007199254740988kB, failcnt 0
Memory cgroup stats for /docker/867781e35d8a0a231ef60a272ae5d418796c45e92b5aa0233df317ce659b0032: cache:340KB rss:130732KB rss_huge:10240KB mapped_file:8KB writeback:0KB swap:130960KB inactive_anon:72912KB active_anon:57880KB inactive_file:112KB active_file:40KB unevictable:0KB
[ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name
[ 1993]     0  1993      380        1       6       3       17             0 sh
[ 2025]     0  2025   203490    32546     221     140    32713             0 npm
Memory cgroup out of memory: Kill process 2025 (npm) score 1001 or sacrifice child
Killed process 2025 (npm) total-vm:813960kB, anon-rss:130184kB, file-rss:0kB

It might be worthwhile to profile the container using something like https://github.com/google/cadvisor to find out what kind of memory maximums it may need. 可能值得使用https://github.com/google/cadvisor之类的文件来对容器进行概要分析,以找出其可能需要的最大内存量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM