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

Memory Leak with MDCUnitOfWork

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.14.1, 3.17.0
    • 3.14.6, 3.18.4, 3.19.0
    • camel-core
    • None
    • Unknown

    Description

      We realized a sever memory leak in a standard route:

       

      I reproduced it and made a simple MemoryAllocation Check.

      Just for curiosity i made another test with:  (.errorhandler(no errorhandler)) and the memory leak does not occure.

       

      Sample route to reproduce:

       

      from("scheduler:testScheduler?repeatCount=1")

                      .log("Starting route test-route")

                      .process(exchange -> {

                          Iterator<String> infiniteIter = new Iterator<>() {

                              private int integer = 0;

       

                              @Override public boolean hasNext()

      {                             return true;                         }

                              @Override public String next()

      {                             return String.valueOf(integer++);                         }

                          };

                          exchange.getMessage().setBody(infiniteIter);

                      })

                      .split().body().streaming()

                          .log("inside split: ${body}")

                      .end()

                      .log("test-route never finishes");

      Attachments

        1. screenshot-1.png
          45 kB
          Michael Rambichler
        2. Screenshot 2022-07-01 at 19.30.44.png
          356 kB
          Claus Ibsen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rambichler Michael Rambichler
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: