Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8946

HttpClient in CXF causing memory leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.3
    • 3.6.3, 4.0.4
    • JAX-RS
    • None
    • Unknown

    Description

      When processing requests using the JAX RS client which used the new HttpClient, there is a memory leak.

      We found this when running it in spring boot using

      @Async

       

      I have tried to reproduce it using the attached code, and it seems to work with a low heap size.

       

      You can execute the code like so:

      mvn compile exec:exec

      Attachments

        1. screenshot-2.png
          587 kB
          Sebastian Violet
        2. screenshot-1.png
          622 kB
          Sebastian Violet
        3. CXF-HTTPClient-MemoryLeak.zip
          144 kB
          Sebastian Violet
        4. memory-leak-demo.zip
          41.86 MB
          Sebastian Violet
        5. call_mem_leak.sh
          0.2 kB
          Sebastian Violet
        6. java_pid91652.0001.hprof.zip
          48.18 MB
          Sebastian Violet
        7. java_pid91652.0001_Leak_Suspects.zip
          104 kB
          Sebastian Violet
        8. Screenshot 2023-10-19 at 2.29.56 PM.png
          499 kB
          Sebastian Violet
        9. java_pid17394.hprof.zip
          14.65 MB
          Sebastian Violet
        10. java_pid17394_Leak_Suspects.zip
          201 kB
          Sebastian Violet

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              sebastian_violet Sebastian Violet
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: