サーバー側で次の例外が発生する理由をよく知っています(クライアントがデータを読み取らずにサーバーから切断します)。ただし、これが発生すると、サーバーは非常に遅くなり、応答しなくなります。サーバーが動作の悪いクライアントに対して回復力があるように、潜在的な解決策を検討しています。
java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[na:1.8.0_45]
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[na:1.8.0_45]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[na:1.8.0_45]
at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.8.0_45]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) ~[na:1.8.0_45]
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:127) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:173) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.coyote.Response.doWrite(Response.java:503) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]
... 103 common frames omitted
Wrapped by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393) ~[tomcat-embed-core-8.0.20.jar!/:8.0.20]