Our log is pretty much completely flooded with warnings like this one:
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (35/74) Caused by: java.io.IOException: Broken pipe
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (36/74) at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (37/74) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (38/74) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (39/74) at sun.nio.ch.IOUtil.write(IOUtil.java:65)
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (40/74) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (41/74) at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:310)
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (42/74) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:362)
Nov 9 11:54:18.138 127.0.0.1 tr10000: WARNING - Connector: (43/74) at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:853)
Nov 9 11:54:18.139 127.0.0.1 tr10000: WARNING - Connector: (44/74) at org.eclipse.jetty.http.AbstractGenerator.blockForOutput(AbstractGenerator.java:523)
Nov 9 11:54:18.139 127.0.0.1 tr10000: WARNING - Connector: (45/74) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:170)
Nov 9 11:54:18.139 127.0.0.1 tr10000: WARNING - Connector: (46/74) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:107)
Nov 9 11:54:18.139 127.0.0.1 tr10000: WARNING - Connector: (47/74) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1720)
Nov 9 11:54:18.139 127.0.0.1 tr10000: WARNING - Connector: (48/74) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1696)
Nov 9 11:54:18.139 127.0.0.1 tr10000: WARNING - Connector: (49/74) at org.apache.commons.io.IOUtils.copy(IOUtils.java:1671)
Nov 9 11:54:18.139 127.0.0.1 tr10000: WARNING - Connector: (50/74) at com.mendix.webui.requesthandling.FileRequestHandler.sendDocument(FileRequestHandler.scala:371)
[cut]
The stacktrace is always the same, they always originate from the RequestHandler for /file.
I have tried to reproduce this issue without success (by throttling Chrome from a low bandwith setting to the 0 bandwidth setting).
It seems to me like this issue is caused by misconfiguration in nginx as used in the Mendix cloud. If I am correct, Nginx communicates with our users, and Jetty only communicates with Nginx. So if Jetty encounters a broken pipe, this must be caused by Nginx suddenly shutting down a connection between Nginx and Jetty. There may be valid reasons for Nginx ending the connection when downloading a file (the client has lost the connection with Nginx), but I think this should never ever result in this message in our log.
Does anyone have any thoughts on this? Is someone more knowledgable on Nginx or its specific settings in the Mendix cloud able to chime in?