任务运行报错:Failing this attempt.Diagnostics: [2022-06-27 15:34:46.704]Container [pid=29399,containerID=container_e90_1650583555174_2830034_03_000001] is running beyond physical memory limits. Current usage: 2.0 GB of 2 GB physical memory used; 4.0 GB of 4.2 GB virtual memory used. Killing container.

问题描述/异常栈

Failing this attempt.Diagnostics: [2022-06-27 15:34:46.704]Container [pid=29399,containerID=container_e90_1650583555174_2830034_03_000001] is running beyond physical memory limits. Current usage: 2.0 GB of 2 GB physical memory used; 4.0 GB of 4.2 GB virtual memory used. Killing container.

排查思路

1.通过"运行日志"查看,异常发生的阶段(提交阶段、运行阶段),此任务异常发生在任务运行阶段

2.点击"任务界面",查看任务异常日志

FAQ-Current usage: 2.0 GB of 2 GB physical memory - 图1

3.从日志异常看,由于内存不足导致

FAQ-Current usage: 2.0 GB of 2 GB physical memory - 图2

4.打开“监控”页面,查看内存gc情况监控,明确gc验证,内存配置不合理导致

FAQ-Current usage: 2.0 GB of 2 GB physical memory - 图3

5.调整调整slot和内存配置比,大概设置为1:3左右,即1个slot对应3072MB,2个slot对应6144MB,根据内存使用情况,酌情调整,同时检查sql中,是否有大状态问题、状态ttl未设置问题等。

解决方案

建议调调整任务tm内存大小。

问题原因

内存不足。

作者:邓崃翔