Suppress java.io.IOException: Broken pipe

I really wouldn’t say so. The error is telling you to take action, that is what this error is all about, not silently disable it. You need to change your settings, and if an error occurs, change it again and adapt it, so that your scripts work.

There are tons of references about this error all over the internet. Usually the problem is, because the connection between your fronted web server and your servelt engine is timing out. Just to surpress the message is a bad idea, because it clearly states that you have a connection problem and the request of YOUR scripts are taking abnormaly long. If cfflush is causing it, it may be because it is doing something to your code, or… ( what I guess is more likely ) you are using cfflush because your script already takes way tooo long, so you want to send data continiously to the client, so the client doesn’t need to wait minutes to see something happening.

I’d try to tackle the problem on the root! Rethink your strategy, e.g. do the stuff async and when it is ready present it to the client. But it’s just a guess.

Just like @Terry_Whitney already told,
it would be even better, if you would share a little bit more information of what you are trying to do with your code, a little bit more of stack trace errors and setup information, versions etc. With sooooo little information and tons of information over the internet about similar issues, it’s very likely you won’t get much help, because all we can do is just guess about what you are doing.

It’s very likely that you need to tweek your timeouts in such a manner that the connectors do not time out. But however, I even don’t know if you are using Apache, Apache2, on Linux, Windows, AJP, Reverse Proxy, IIS or whatever, we are just guessing from your little information.

In a nutshell: I’d check the timeouts on your front end and on your servlet engine and make them last longer. But changing the strategy would be more efficient, I guess.