Connection reset by peer: socket write error - cfcontent on Coldfusion 10
Asked Answered
G

1

6

We recently upgraded from Coldfusion 9 to CF10 and I'm now receiving a sporadic error on a page where I'm using cfcontent to serve documents (pdf, doc, etc.) I'm using cfcontent to control access to the files, as some are for internal use only. This was not occurring when using CF9 (both standard), and I'm thinking it may be related to the change to Tomcat.

I can't recreate the error, but it's occurring 200 times per day or so:

coldfusion.tagext.OutputException: The cause of this output exception was that: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error

Gut answered 27/8, 2012 at 12:5 Comment(0)
H
10

This error indicates that the HTTP connection was terminated by the client (the browser). It occurs when the user hits the "stop" button during a long running request. The CF Server prepares the output buffer but when it hands it back to Apache or IIS the web server informs it that client is no longer listening.

In the past this error would occur in the "server.log" file. Perhaps the behavior that has changed is that the error is now thrown as an exception to the regular stdout and trapped by the application logs.

This error could be occuring because users are getting impatient but it could also be occurring due to network issues or improperly configured IIS or Apache. It could and does occur under heavy load as well - anything that make HTTP/TCP connections drop could generate this error. Again... I'm not saying you should not worry about the error. It is a new previously unobserved behavior and as such it warrants attention. But there are legitimate reasons why this sort of error might be thrown.

Holleyholli answered 27/8, 2012 at 12:54 Comment(3)
Thanks Mark, that explains why I wasn't seeing the error before. I wonder if there is anything I can do in the Tomcat or Apache configuration to reduce the frequency of occurrence?Gut
Well... shorter running requests will help. If these are legit then they are the result of people simply closing their browsers. They could also be bots if you have some public links to long running requests. Perhaps log your long running pages and start there?Holleyholli
Thanks, it seems that most are bots, that may have short timeouts. Some of the documents are large PDFs, so folks may be aborting their attempts before they finish. Again, I appreciate your help!Gut

© 2022 - 2024 — McMap. All rights reserved.