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

Memory Leak with MDCUnitOfWork

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment