'SonarQube "broken pipe" errors
In our SonarQube logs we have been seeing errors like
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
or like
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Connection reset by peer
It used to happen once or twice a week but in the past couple of weeks, it's been happening every day. It apears that this is some error internal to Sonar application and it doesn't look like it's affecting the actual Sonar analysis.
After various Googling about this error, I ran into this (https://hc.apache.org/httpcomponents-client-4.2.x/tutorial/html/connmgmt.html):
CoreConnectionPNames.STALE_CONNECTION_CHECK='http.connection.stalecheck': determines whether stale connection check is to be used. Disabling stale connection check may result in a noticeable performance improvement (the check can cause up to 30 millisecond overhead per request) at the risk of getting an I/O error when executing a request over a connection that has been closed at the server side. This parameter expects a value of type java.lang.Boolean. For performance critical operations the check should be disabled. If this parameter is not set, the stale connection check will be performed before each request execution.
I scanned through Sonar source code and its chain of HTTP library dependencies (https://github.com/square/okhttp and https://github.com/apache/httpcomponents-client) but couldn't find any clear reference to the above staleness check.
Looking for help
- to clarify what this error means
- is it benign?
- is there a way to avoid this error?
Solution 1:[1]
Typically, those errors are benign since they occurs when the client (browser) is stopping the connection with the server (SonarQube), this can be because someone click on "stop" while loading the page.
Solution 2:[2]
It can be that your SonarQube is behind a reverse proxy or a load balancer, and the analysis is too large (typically >1MB after being zipped) and the load balancer drops it. You may need to reconfigure your LB/reverse proxy to accept larger payloads.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Eric Hartmann |
| Solution 2 | Musinux |
