Broken pipe errors during document download

0
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?
asked
3 answers
1

I've run into the same issue and filed a support ticket. Their answer was:

"Warning : caused by java.io.IOException: Broken pipe" usually means that the process wants to write data to a connection that is not available anymore. For example, this could happen when a request is done, the application starts processing the request, in the meanwhile the user closes their browser (or a web service call closes the HTTP connection), and when the application is done processing the request and wants to write the response back to the HTTP connection, it's not there anymore. This might also result in deadlocks.

It is recommended to check what it is running to find out the root cause for the issue. For that you can use the Runing Now Metrics (https://docs.mendix.com/developerportal/operate/troubleshooting-mxcloud-runningnow#1-introduction) and also you can use Query Logging (https://docs.mendix.com/refguide/tricky-custom-runtime-settings#3-query-logging). 

answered
0

Nikel, we have currently the same after a migration from Mx4 to Mx6. Did you ever find a sollution for this?

Regards,

Ronald

 

answered
0

I had similar warnings in one of our apps. The warning was caused by the file document viewer (running MX7). Setting the configuration option "Use PDF js” solved the problem in my case. 

answered