title: Spring Cloud: Zuul java.net.SocketException: Broken pipe
body: <p>I am doing some stress test of a simple spring cloud app backed by a zuul proxy service
  Sporadically we have a broken pipe exception due to a stale  connection between Zuul and the service.
  I configure Zuul with diferent configuration options without success:</p>
  <pre><code>hystrix:
    command:
      default:
        execution:
          isolation:
            strategy: THREAD
            thread:
              timeoutInMilliseconds: 61000
  
  
  ribbon:
    ReadTimeout: 60000
    ConnectTimeout: 6000
  
  zuul:
    host:
      socket-timeout-millis: 60000
      connect-timeout-millis: 60000
  </code></pre>
  <p>The exception is as follows:</p>
  <blockquote>
  <p>com.netflix.zuul.exception.ZuulException: Forwarding error
  at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:151) ~[router.jar!/:0.0.1]
  at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:114) ~[router.jar!/:0.0.1]
  at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:112) ~[zuul-core-1.0.28.jar!/:na]</p>
  </blockquote>
  <blockquote>
  <p>Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: query-serviceRibbonCommand failed and no fallback available.
  at com.netflix.hystrix.AbstractCommand$20.call(AbstractCommand.java:816) ~[hystrix-core-1.4.0-RC6.jar!/:na]
  at com.netflix.hystrix.AbstractCommand$20.call(AbstractCommand.java:798) ~[hystrix-core-1.4.0-RC6.jar!/:na]
  at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$1.onError(OperatorOnErrorResumeNextViaFunction.java:77) ~[rxjava-1.0.4.jar!/:1.0.4]
  at rx.internal.operators.OperatorDoOnEach$1.onError(OperatorDoOnEach.java:70) ~[rxjava-1.0.4.jar!/:1.0.4]</p>
  </blockquote>
  <blockquote>
  <p>Caused by: java.net.SocketException: Broken pipe
  at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.8.0_45]
  at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) ~[na:1.8.0_45]
  at java.net.SocketOutputStream.write(SocketOutputStream.java:153) ~[na:1.8.0_45]
  at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:159) ~[httpcore-4.3.3.jar!/:4.3.3]
  ...
  at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55) ~[rxjava-1.0.4.jar!/:1.0.4]
  at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:185) ~[ribbon-loadbalancer-2.0-RC13.jar!/:na]
  at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180</p>
  </blockquote>