title: Eureka - If peer goes down, instances spam a lot of logs
body: <p>we have an eureka setup with two peers.
  These two peers are running on two different virtual machines, testvm01.mydomain.com and testvm02.mydomain.com.</p>
  
  <p>These two peers use the following configurations.</p>
  
  <p>Peer1:</p>
  
  <pre><code>eureka:
    instance:
      hostname: testvm01.mydomain.com
      leaseRenewalIntervalInSeconds: 3
    client:
      registerWithEureka: true
      serviceUrl:
        defaultZone: http://testvm02.mydomain.com:8761/eureka
    dashboard:
      enabled: true
  </code></pre>
  
  <p>Peer2:</p>
  
  <pre><code>eureka:
    instance:
      hostname: testvm02.mydomain.com
      leaseRenewalIntervalInSeconds: 3
    client:
      registerWithEureka: true
      serviceUrl:
        defaultZone: http://testvm01.mydomain.com:8761/eureka
    server:
      waitTimeInMsWhenSyncEmpty: 0
    dashboard:
      enabled: true
  </code></pre>
  
  <p>If i shutdown own of these two eureka peers now, the other one produces a lot of log messages like the following one:</p>
  
  <pre><code>2015-05-28 12:07:18.675 ERROR 15871 --- [artbeat-process] c.netflix.eureka.cluster.PeerEurekaNode  : PeerEurekaNode: http://testvm01.mydomain.com:8761/eurekaapps/: MAIL-SERVICE/testvm02.mydomain.com:mail-service:9880:Heartbeat
  
  com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out
      at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
      at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:28)
      at com.sun.jersey.api.client.Client.handle(Client.java:648)
      at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
      at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
      at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:527)
      at com.netflix.eureka.cluster.PeerEurekaNode.sendHeartBeat(PeerEurekaNode.java:510)
      at com.netflix.eureka.cluster.PeerEurekaNode.access$400(PeerEurekaNode.java:72)
      at com.netflix.eureka.cluster.PeerEurekaNode$3.execute(PeerEurekaNode.java:275)
      at com.netflix.eureka.cluster.PeerEurekaNode$6.executeSingle(PeerEurekaNode.java:992)
      at com.netflix.eureka.cluster.PeerEurekaNode$6.process(PeerEurekaNode.java:844)
      at com.netflix.logging.messaging.MessageBatcher$ProcessMessages.run(MessageBatcher.java:410)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.net.SocketTimeoutException: Read timed out
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
      at java.net.SocketInputStream.read(SocketInputStream.java:170)
      at java.net.SocketInputStream.read(SocketInputStream.java:141)
      at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
      at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
      at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:273)
      at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
      at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
      at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)
      at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283)
      at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:251)
      at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:223)
      at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)
      at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
      at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685)
      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487)
      at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
      at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
      ... 14 common frames omitted
  </code></pre>
  
  <p>These produces around 5 GB of log messages in less than 3 hours.</p>
  
  <p>Is something wrong with my configuration? Is this a bug either in spring-cloud or in eureka?
  What can i do to handle this properly? For now i just turned off logging for com.netflix.eureka.cluster.PeerEurekaNode, but this is for sure unacceptable for a production environment later on.</p>
  
  <p>Versions:<br>
  Spring-Boot: 1.2.3.RELEASE<br>
  Spring-Cloud-Starter-Parent-Bom: 1.0.1.RELEASE</p>