我想将Web应用程序部署到App Engine。此Web应用程序包含几个用于启动某些Google Dataflow作业的servlet。
我在本地运行我的webapp(mvn jetty:run)并启动调用我的servlet的数据流作业时没有问题。但我很难在App Engine中部署webapp。
错误消息是:
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.506921] java invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.514328] java cpuset=b888170c5457fc14d6375c3a890ae140db7e7c0103fc3f400fed0177bce46b2c mems_allowed=0
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.524285] CPU: 0 PID: 4159 Comm: java Tainted: G C 3.16.0-4-amd64 #1 Debian 3.16.39-1
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.533382] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.542888] 0000000000000000 ffffffff81514c11 ffff88003cd263d0 ffff88002ee41400
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.550958] ffffffff815127e9 ffff88003cd268e8 0000000100000000 ffff88003d5d4800
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.558957] ffff88003cd263d0 ffff88003fc12f40 ffff88003c76b080 ffff88003d5d4800
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.567115] Call Trace:
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.569688] [<ffffffff81514c11>] ? dump_stack+0x5d/0x78
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.575112] [<ffffffff815127e9>] ? dump_header+0x76/0x1e8
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.580812] [<ffffffff8114243d>] ? find_lock_task_mm+0x3d/0x90
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.586929] [<ffffffff8114287d>] ? oom_kill_process+0x21d/0x370
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.593048] [<ffffffff8114243d>] ? find_lock_task_mm+0x3d/0x90
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.599254] [<ffffffff811a292a>] ? mem_cgroup_oom_synchronize+0x52a/0x590
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.606417] [<ffffffff811a1eb0>] ? mem_cgroup_try_charge_mm+0xa0/0xa0
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.613333] [<ffffffff81143030>] ? pagefault_out_of_memory+0x10/0x80
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.619886] [<ffffffff81058515>] ? __do_page_fault+0x3c5/0x4f0
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.626010] [<ffffffff81173bbf>] ? mprotect_fixup+0x14f/0x270
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.631985] [<ffffffff8151cde8>] ? page_fault+0x28/0x30
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.637757] Task in /b888170c5457fc14d6375c3a890ae140db7e7c0103fc3f400fed0177bce46b2c killed as a result of limit of /b888170c5457fc14d6375c3a890ae140db7e7c0103fc3f400fed0177bce46b2c
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.654851] memory: usage 629760kB, limit 629760kB, failcnt 7625
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.660978] memory+swap: usage 0kB, limit 18014398509481983kB, failcnt 0
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.667813] kmem: usage 0kB, limit 18014398509481983kB, failcnt 0
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.674120] Memory cgroup stats for /b888170c5457fc14d6375c3a890ae140db7e7c0103fc3f400fed0177bce46b2c: cache:24KB rss:629736KB rss_huge:0KB mapped_file:0KB writeback:0KB inactive_anon:0KB active_anon:629760KB inactive_file:0KB active_file:0KB unevictable:0KB
A Feb 27 19:16:07 aef-default-version20-xpjd kernel: [ 50.561039] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name
A Feb 27 19:16:07 aef-default-version20-xpjd kernel: [ 50.569102] [ 3912] 999 3912 746739 158540 567 0 0 java
A Feb 27 19:16:07 aef-default-version20-xpjd kernel: [ 50.577122] Memory cgroup out of memory: Kill process 3912 (java) score 1010 or sacrifice child
A Feb 27 19:16:07 aef-default-version20-xpjd kernel: [ 50.585961] Killed process 3912 (java) total-vm:2986956kB, anon-rss:627524kB, file-rss:6636kB
问题可能在于此内存限制(?):
A Feb 28 09:26:05 aef-default-version22-rh34 kernel: [ 47.654851] memory: usage 629760kB, limit 629760kB, failcnt 7625
你知道它是哪种记忆吗?它是我的war文件,其中包含运行数据流管道所需的所有依赖项,这些管道填充了超过629760kB的内存?你有什么想法可以看吗?
答案 0 :(得分:1)
是的,您的应用看起来需要超过默认的0.6 GB或内存,您需要在Resource settings中配置更多内存:
<强> memory_gb 强>
GB中的RAM。您的应用程序请求的内存。每个CPU核心 需要0.9到6.5 GB的总内存,其中包括~0.4 GB用于某些进程的开销(可能会发生变化)。至 计算所请求的内存:memory_gb = NUMBER_CPU_CORES * [0.9 - 6.5] - 0.4。对于您指定了2个核心的上述示例,您可以请求1.4到12.6 GB之间的内核。内存总量 应用程序可用的运行时环境设置为 环境变量 GAE_MEMORY_MB 。