我们正在使用播放版本1.3.4,并在将JSON响应写回到客户端时遇到奇怪的间歇性问题。
应用程序当前正在使用播放库Controller.renderJSON(gson().toJson(object));
来写回响应。
我们将播放日志设置为“跟踪”级别,并发现在写入内容之前,该日志会显示关闭频道错误。
此问题仅出现在我们的暂存环境中,但是在其他环境(例如TEST和PROD)上可以正常工作,因此它似乎不是代码问题。
有人可以建议出什么问题吗?
与Linux OS资源有关吗?
日志摘要:
2018-10-04 08:05:30,535 app=“deliver”, level=TRACE, thread=play-thread-1, logger=play, userId="", reqAction="", reqUrl="", message=“copyResponse: begin”
2018-10-04 08:05:30,536 app=“deliver”, level=TRACE, thread=play-thread-1, logger=play, userId="", reqAction="", reqUrl="", message=“writeResponse: begin”
2018-10-04 08:05:30,537 app=“deliver”, level=TRACE, thread=play-thread-1, logger=play, userId="", reqAction="", reqUrl="", message=“writeResponse: content length [13410]”
2018-10-04 08:05:30,537 app=“deliver”, level=DEBUG, thread=play-thread-1, logger=play, userId="", reqAction="", **reqUrl="", message=“Try to write on a closed channel[keepAlive:true]: Remote host may have closed the connection”**
2018-10-04 08:05:30,537 app=“deliver”, level=TRACE, thread=play-thread-1, logger=play, userId="", reqAction="", reqUrl="", message=“writeResponse: end”
2018-10-04 08:05:30,537 app=“deliver”, level=TRACE, thread=play-thread-1, logger=play, userId="", reqAction="", reqUrl="", message=“copyResponse: end”
2018-10-04 08:05:30,537 app=“deliver”, level=TRACE, thread=play-thread-1, logger=play, userId="", reqAction="", reqUrl="", message=“execute: end”
2018-10-04 08:05:30,538 app=“deliver”, level=TRACE, thread=play-thread-1, logger=play, userId="", reqAction="", reqUrl="", message=“run: end”