dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

FailbackClusterInvoker should limit the size of failed invocations

Open ralf0131 opened this issue 8 years ago • 3 comments

Currently in FailbackClusterInvoker there is a map to store the failed invocations, however the size is unlimited.

In a high throughput application, It is possible that the failed invocations will fill up the memory and exhaust the memory.

I think it is better to:

  • limit the size of the map
  • choose the strategy to discard the failed invocations. e.g. FIFO, LIFO, etc.
  • retry period should be configurable
  • shutdown the ExecutorService when destroyed

ralf0131 avatar Sep 02 '18 06:09 ralf0131

Agreed, this maybe cause a risk of memory leak.

Jeff-Lv avatar Sep 14 '18 01:09 Jeff-Lv

This issue has been prevented for some time and I will start to solve this problem in the near future.

carryxyh avatar Oct 12 '18 08:10 carryxyh

Close via https://github.com/apache/incubator-dubbo/pull/2822

carryxyh avatar Dec 25 '18 03:12 carryxyh