Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 366
Steve Judd Avatar asked Aug 27 '12 12:08

Steve Judd


1 Answers

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.

like image 74
Mark A Kruger Avatar answered Oct 31 '22 05:10

Mark A Kruger