• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

If ehcache has been configured to use multicast for peer discovery (RMICacheManagerPeerProviderFactory) but multicast packets are being rejected by a firewall then ehcache consumes all CPU and exhibits excessive logging at level debug.

The problem is MulticastKeepaliveHeartbeatSender: when the send on line 135 fails the IOException is caught and another send is immediately retried, effectively sending this whole thing into tight loop. The solution is to make sure to wait a little bit after an error is encountered. The attached simple patch does this, but an improvement might be to use a backoff mechanism so that the send is immediately retried after an error, but if the error persists then successively longer waits are done between retries.

The attached patch also ensures the stack trace from the IOException is logged so it’s clear where exactly the exception is being thrown.

Sourceforge Ticket ID: 1755263 - Opened By: roadrunner2 - 17 Jul 2007 04:30 UTC

Comments

Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320 Originator: NO

Ronald

Applied to trunk. Will be in 1.4.

The problem with distributed anything is all the network stuff that can go wrong. I think your patch is a sensible de-spamming.

Greg Comment by: gregluck - 13 Aug 2007 07:43 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira