Sin memory en una aplicación en el entorno flexible de Google App Engine

Estoy desarrollando una aplicación Scala / PlayFramework alojada en el entorno flexible de Google App Engine, así que utilizo Docker. Mi aplicación falla de vez en cuando porque se está quedando sin memory, pero no es java.lang.OutOfMemoryError. Parece ser un problema con Docker. También traté de ejecutar la aplicación localmente sin utilizar Docker y funciona bien, no se observaron pérdidas de memory. Tal vez alguien pueda ayudarme a leer estos loggings, descifrarlos y descubrir cómo solucionar este problema:

15:31:41 OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode) 15:31:41 OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-1~bpo8+1-b11) 15:31:41 jvm_internals.cc:376] Loading internals from /opt/cdbg/cdbg_java_agent_internals.jar 15:31:41 jvmti_agent_thread.cc:99] Agent thread started: CloudDebugger_main_worker_thread 15:31:41 jvmti_agent.cc:213] JvmtiAgent::JvmtiOnVMInit initialization time: 249286 microseconds 15:31:40 Java VM started 15:31:40 Java debuglet initialization completed 15:31:40 Java debuglet initialization started 15:31:40 -XX:InitialHeapSize=514850816 -XX:MaxHeapSize=514850816 -XX:+ParallelRefProcEnabled -XX:+PrintCommandLineFlags -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC 15:31:36 Health checks: instance=aef-default-20170929t133436-jql3 start=2017-09-29T12:28:01+00:00 end=2017-09-29T12:28:58+00:00 total=73 unhealthy=0 healthy=73 15:31:36 kernel: [ 6813.224698] Killed process 3909 (java) total-vm:2609000kB, anon-rss:601976kB, file-rss:0kB 15:31:35 kernel: [ 6813.217184] Out of memory: Kill process 3909 (java) score 589 or sacrifice child 15:31:35 kernel: [ 6813.209234] [15826] 0 15826 2714 72 10 0 0 bash 15:31:35 kernel: [ 6813.201272] [15825] 0 15825 2714 72 10 0 0 bash 15:31:35 kernel: [ 6813.193247] [15824] 0 15824 2714 72 10 0 0 bash 15:31:35 kernel: [ 6813.185171] [15823] 0 15823 2714 72 10 0 0 bash 15:31:35 kernel: [ 6813.177217] [15822] 0 15822 2714 248 10 0 0 bash 15:31:35 kernel: [ 6813.169106] [15796] 0 15796 9732 1724 24 0 0 python 15:31:35 kernel: [ 6813.161166] [15795] 0 15795 2714 93 10 0 0 bash 15:31:35 kernel: [ 6813.145428] [15787] 0 15787 1049 99 7 0 0 sh 15:31:35 kernel: [ 6813.137482] [15785] 0 15785 8272 442 20 0 0 cron 15:31:35 kernel: [ 6813.128573] [15764] 0 15764 13433 2044 30 0 0 manage_accounts 15:31:35 kernel: [ 6813.120448] [ 4226] 0 4226 11212 1896 26 0 0 python 15:31:35 kernel: [ 6813.111544] [ 4078] 0 4078 71364 1223 77 0 0 stackdriver-col 15:31:35 kernel: [ 6813.103421] [ 3970] 0 3970 1028 111 7 0 0 logger 15:31:35 kernel: [ 6813.094841] [ 3967] 0 3967 2354 286 10 0 0 run-scripts 15:31:35 kernel: [ 6813.086893] [ 3909] 0 3909 652250 150494 386 0 0 java 15:31:35 kernel: [ 6813.077967] [ 3897] 0 3897 48770 107 17 0 0 docker-containe 15:31:35 kernel: [ 6813.070114] [ 3893] 0 3893 34112 643 29 0 0 exe 15:31:35 kernel: [ 6813.062084] [ 3732] 0 3732 1971 147 9 0 0 proxy 15:31:35 kernel: [ 6813.053174] [ 3716] 0 3716 48770 99 18 0 0 docker-containe 15:31:35 kernel: [ 6813.045088] [ 3709] 0 3709 5347 187 14 0 -1000 udevd 15:31:35 kernel: [ 6813.037024] [ 3708] 0 3708 5347 187 14 0 -1000 udevd 15:31:35 kernel: [ 6813.028994] [ 3372] 104 3372 10296 1407 24 0 0 nginx 15:31:35 kernel: [ 6813.021055] [ 3370] 0 3370 184907 31672 147 0 0 ruby 15:31:35 kernel: [ 6813.013025] [ 3367] 0 3367 9685 787 24 0 0 nginx 15:31:35 kernel: [ 6813.005019] [ 3363] 0 3363 6476 60 18 0 0 cron 15:31:35 kernel: [ 6812.996082] [ 3256] 0 3256 5017 72 16 0 0 start_nginx.sh 15:31:35 kernel: [ 6812.987176] [ 3242] 0 3242 48770 105 18 0 0 docker-containe 15:31:35 kernel: [ 6812.979309] [ 3237] 0 3237 15150 925 26 0 0 exe 15:31:35 kernel: [ 6812.971373] [ 3042] 0 3042 90362 12353 85 0 0 ruby 15:31:35 kernel: [ 6812.962468] [ 3030] 0 3030 48770 119 17 0 0 docker-containe 15:31:35 kernel: [ 6812.954360] [ 2946] 0 2946 18144 4028 40 0 0 python 15:31:35 kernel: [ 6812.946505] [ 2945] 0 2945 1697 227 9 0 0 awk 15:31:35 kernel: [ 6812.938567] [ 2944] 0 2944 1039 28 8 0 0 tail 15:31:35 kernel: [ 6812.930631] [ 2938] 0 2938 2345 442 10 0 0 bash 15:31:35 kernel: [ 6812.922512] [ 2921] 0 2921 19781 4155 38 0 0 python 15:31:35 kernel: [ 6812.914383] [ 2914] 0 2914 1028 373 8 0 0 logger 15:31:35 kernel: [ 6812.906355] [ 2913] 0 2913 2328 329 10 0 0 run 15:31:35 kernel: [ 6812.898387] [ 2911] 0 2911 2325 358 10 0 0 bash 15:31:35 kernel: [ 6812.890259] [ 2763] 0 2763 1026 341 8 0 0 logger 15:31:35 kernel: [ 6812.881591] [ 2756] 0 2756 2316 337 10 0 0 run-scripts 15:31:35 kernel: [ 6812.873031] [ 2755] 0 2755 2315 363 10 0 0 run-scripts 15:31:35 kernel: [ 6812.864117] [ 2728] 0 2728 2312 388 10 0 0 run-startup-scr 15:31:35 kernel: [ 6812.855057] [ 2725] 0 2725 1049 344 8 0 0 google-startup- 15:31:35 kernel: [ 6812.847102] [ 2554] 101 2554 8723 380 22 0 0 ntpd 15:31:35 kernel: [ 6812.838896] [ 2520] 0 2520 41388 2803 59 0 0 kubelet 15:31:35 kernel: [ 6812.829992] [ 2485] 0 2485 9089 1877 21 0 0 manage_addresse 15:31:35 kernel: [ 6812.821087] [ 2473] 0 2473 12333 1856 26 0 0 manage_accounts 15:31:35 kernel: [ 6812.812769] [ 2471] 0 2471 1028 325 9 0 0 startpar 15:31:35 kernel: [ 6812.803860] [ 2301] 0 2301 49413 752 21 0 0 docker-containe 15:31:35 kernel: [ 6812.795738] [ 2267] 0 2267 129850 4168 60 0 0 docker 15:31:35 kernel: [ 6812.787782] [ 2211] 0 2211 5106 349 14 0 0 cron 15:31:35 kernel: [ 6812.779231] [ 2179] 0 2179 13124 2560 27 0 0 supervisord 15:31:35 kernel: [ 6812.771188] [ 2109] 0 2109 1033 363 8 0 0 acpid 15:31:35 kernel: [ 6812.762905] [ 2067] 0 2067 13218 116 20 0 0 rsyslogd 15:31:35 kernel: [ 6812.754621] [ 1958] 0 1958 3131 578 12 0 0 startpar 15:31:35 kernel: [ 6812.746832] [ 1949] 0 1949 1049 343 7 0 0 rc 15:31:35 kernel: [ 6812.738711] [ 1862] 0 1862 1378 828 8 0 -17 iscsid 15:31:34 kernel: [ 6812.722111] [ 1781] 0 1781 6328 53 17 0 0 rpc.idmapd 15:31:34 kernel: [ 6812.713705] [ 1765] 102 1765 5840 525 16 0 0 rpc.statd 15:31:34 kernel: [ 6812.705475] [ 1734] 0 1734 4747 318 15 0 0 rpcbind 15:31:34 kernel: [ 6812.697180] [ 1652] 0 1652 2492 654 9 0 0 dhclient 15:31:34 kernel: [ 6812.689141] [ 336] 0 336 5348 529 15 0 -1000 udevd 15:31:34 kernel: [ 6812.681184] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name 15:31:34 kernel: [ 6812.678026] 0 pages hwpoisoned 15:31:34 kernel: [ 6812.674691] 5917 pages reserved 15:31:34 kernel: [ 6812.670748] 0 pages HighMem/MovableOnly 15:31:34 kernel: [ 6812.667762] 262043 pages RAM 15:31:34 kernel: [ 6812.664701] Total swap = 0kB 15:31:34 kernel: [ 6812.661699] Free swap = 0kB 15:31:34 kernel: [ 6812.656368] Swap cache stats: add 0, delete 0, find 0/0 15:31:34 kernel: [ 6812.652926] 0 pages in swap cache 15:31:34 kernel: [ 6812.649061] 2159 total pagecache pages 15:31:34 kernel: [ 6812.640512] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 15:31:34 kernel: [ 6812.621964] Node 0 DMA32: 963*4kB (UEM) 668*8kB (UEM) 424*16kB (UEM) 267*32kB (UEM) 87*64kB (UE) 43*128kB (UEM) 10*256kB (UE) 4*512kB (UM) 0*1024kB 0*2048kB 1*4096kB (R) = 44300kB 15:31:34 kernel: [ 6812.604836] Node 0 DMA: 3*4kB (U) 2*8kB (U) 1*16kB (M) 3*32kB (UM) 4*64kB (UM) 1*128kB (M) 2*256kB (UM) 1*512kB (U) 1*1024kB (M) 1*2048kB (R) 0*4096kB = 4620kB 15:31:34 kernel: [ 6812.600368] lowmem_reserve[]: 0 0 0 0 15:31:34 kernel: [ 6812.556254] Node 0 DMA32 free:44300kB min:44352kB low:55440kB high:66528kB active_anon:897428kB inactive_anon:180kB active_file:2324kB inactive_file:2748kB unevictable:4004kB isolated(anon):0kB isolated(file):0kB present:1032180kB managed:1008512kB mlocked:4004kB dirty:0kB writeback:4kB mapped:5060kB shmem:768kB slab_reclaimable:12128kB slab_unreclaimable:12984kB kernel_stack:3952kB pagetables:6760kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:9142 all_unreclaimable? yes 15:31:34 kernel: [ 6812.551386] lowmem_reserve[]: 0 982 982 982 15:31:34 kernel: [ 6812.510053] Node 0 DMA free:4620kB min:700kB low:872kB high:1048kB active_anon:10024kB inactive_anon:8kB active_file:52kB inactive_file:196kB unevictable:72kB isolated(anon):0kB isolated(file):0kB present:15992kB managed:15908kB mlocked:72kB dirty:0kB writeback:4kB mapped:120kB shmem:16kB slab_reclaimable:344kB slab_unreclaimable:324kB kernel_stack:16kB pagetables:104kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:978 all_unreclaimable? yes 15:31:34 kernel: [ 6812.478038] free_cma:0 15:31:34 kernel: [ 6812.478038] mapped:1295 shmem:196 pagetables:1716 bounce:0 15:31:34 kernel: [ 6812.478038] free:12230 slab_reclaimable:3118 slab_unreclaimable:3327 15:31:34 kernel: [ 6812.478038] unevictable:1019 dirty:0 writeback:2 unstable:0 15:31:34 kernel: [ 6812.478038] active_file:594 inactive_file:736 isolated_file:0 15:31:34 kernel: [ 6812.478038] active_anon:226863 inactive_anon:47 isolated_anon:0 15:31:34 kernel: [ 6812.473125] CPU 0: hi: 186, btch: 31 usd: 30 15:31:34 kernel: [ 6812.469595] Node 0 DMA32 per-cpu: 15:31:34 kernel: [ 6812.464698] CPU 0: hi: 0, btch: 1 usd: 0 15:31:34 kernel: [ 6812.461226] Node 0 DMA per-cpu: 15:31:34 kernel: [ 6812.453398] [<ffffffff8151c4a8>] ? page_fault+0x28/0x30 15:31:34 kernel: [ 6812.447983] [<ffffffff810d683e>] ? SyS_futex+0x6e/0x150 15:31:34 kernel: [ 6812.441960] [<ffffffff810582c7>] ? __do_page_fault+0x177/0x4f0 15:31:34 kernel: [ 6812.435845] [<ffffffff8116c0fc>] ? handle_mm_fault+0x63c/0x1150 15:31:34 kernel: [ 6812.429379] [<ffffffff8116a8ce>] ? do_read_fault.isra.54+0x4e/0x300 15:31:34 kernel: [ 6812.423963] [<ffffffff81167d0a>] ? __do_fault+0x3a/0xa0 15:31:34 kernel: [ 6812.418114] [<ffffffff81141b40>] ? filemap_fault+0x1a0/0x420 15:31:34 kernel: [ 6812.411827] [<ffffffff8118894d>] ? alloc_pages_current+0x9d/0x150 15:31:34 kernel: [ 6812.405193] [<ffffffff8114940f>] ? __alloc_pages_nodemask+0x9ef/0xb50 15:31:34 kernel: [ 6812.399338] [<ffffffff81143543>] ? out_of_memory+0x473/0x4b0 15:31:34 kernel: [ 6812.393293] [<ffffffff8114299d>] ? find_lock_task_mm+0x3d/0x90 15:31:34 kernel: [ 6812.387176] [<ffffffff81142ddd>] ? oom_kill_process+0x21d/0x370 15:31:34 kernel: [ 6812.380707] [<ffffffff8115431c>] ? do_try_to_free_pages+0x4ac/0x520 15:31:34 kernel: [ 6812.374939] [<ffffffff810c44e4>] ? rcu_oom_notify+0xc4/0xe0 15:31:34 kernel: [ 6812.369089] [<ffffffff81068a53>] ? put_online_cpus+0x23/0x80 15:31:34 kernel: [ 6812.363759] [<ffffffff81518c3e>] ? mutex_lock+0xe/0x2a 15:31:34 kernel: [ 6812.357127] [<ffffffff810d6f6f>] ? smp_call_function_single+0x5f/0xa0 15:31:34 kernel: [ 6812.351396] [<ffffffff81511e59>] ? dump_header+0x76/0x1e8 15:31:34 kernel: [ 6812.345979] [<ffffffff81514281>] ? dump_stack+0x5d/0x78 15:31:34 kernel: [ 6812.343427] Call Trace: 15:31:34 kernel: [ 6812.335480] ffffffff81518c3e 0000000000000200 ffffffff81068a53 ffffffff810c44e4 15:31:34 kernel: [ 6812.327545] ffffffff81511e59 0000000000000000 ffffffff810d6f6f 0000000000000000 15:31:34 kernel: [ 6812.319569] 0000000000000000 ffffffff81514281 ffff88003cf5cce0 0000000000000000 15:31:34 kernel: [ 6812.310065] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 15:31:34 kernel: [ 6812.300388] CPU: 0 PID: 4349 Comm: java Tainted: GC 3.16.0-4-amd64 #1 Debian 3.16.43-2+deb8u3 15:31:34 kernel: [ 6812.290586] java cpuset=c0a91fe17df33d2a8e0163bdb3c3197d003dcda5a26cfc3d3a1f505a3ed98539 mems_allowed=0 15:31:34 kernel: [ 6812.283051] java invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0 15:31:12 /USR/SBIN/CRON[15786]: (root) CMD (/bin/bash /usr/share/vm_runtime/vm_check_disk_space.sh | logger -t vm_check_disk_space.sh) 15:31:12 /USR/SBIN/CRON[15787]: (root) CMD (/bin/bash /usr/share/vm_runtime/vm_log_health_check_stats.sh) There go regular debugs logs of the application