diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md
index 6bf25634..d4774eea 100644
--- a/doc/XXL-JOB官方文档.md
+++ b/doc/XXL-JOB官方文档.md
@@ -1434,7 +1434,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
- 18、调度日志排序逻辑调整为按照调度时间倒序,兼容TIDB等主键不连续日志存储组件;
- 19、执行器优雅停机优化;
- 20、连接池配置优化,增强连接有效性验证;
-- 21、[迭代中]JobHandler执行结果日志长度限制:
+- 21、JobHandler#msg长度限制,修复异常情况下日志超长导致内存溢出的问题;
- 22、[迭代中]执行器端口复用:
- 23、[迭代中]任务线程隔离:
- 执行器测异步响应,不存在阻塞不需要隔离;
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java b/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
index 290b7e54..c1f2b640 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
@@ -154,6 +154,9 @@ public class JobThread extends Thread{
if (executeResult == null) {
executeResult = IJobHandler.FAIL;
+ } else {
+ executeResult.setMsg((executeResult!=null&&executeResult.getMsg().length()>50000)?executeResult.getMsg().substring(0, 50000).concat("..."):executeResult.getMsg());
+ executeResult.setContent(null); // limit obj size
}
XxlJobLogger.log("
----------- xxl-job job execute end(finish) -----------
----------- ReturnT:" + executeResult);