Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20301

Camel retains objects when restarting route via policy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.3
    • 4.0.4, 4.4.0
    • came-core
    • None
    • Unknown

    Description

      When restarting a route using a RoutePolicy, Camel seems to retain objects related to the stopped route, preventing the GC from reclaiming those. 

      Heap dump analysis indicated that the objects are retained by org.apache.camel.impl.engine.DefaultRoute.services

      I've created a minimal reproducer in https://github.com/sebastian-brandt/RoutePolicyIssue using a route with a seda consumer.

      The issue becomes more apparent when the restarted route uses a consumer component that itself uses more memory (e.g. netty).

      The accumulated old objects eventually lead to OOM error.

      Attachments

        Issue Links

          Activity

            People

              orpiske Otavio Rodolfo Piske
              sbrandt Sebastian Brandt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: