Play Closed channel issue


(Vikas) #1

Dear All,

We are using play version 1.3.4 and facing strange intermittent issue while writing the JSON response back to the client. Application is currently using the play library Controller.renderJSON(gson().toJson(object)); to write the response back.

We enabled play log to ‘Trace’ level and found that its giving closed channel error before writing the content. This issue is also coming on one of our Staging environment but working fine on other environments like TEST and PROD, so it doesn’t looks to be a code issue. Can anyone please suggest what could be the issue? Is it related to Linux OS resources?
Any suggestion or help would be highly appreciated.

Logs snippet:-

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”