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

SshClient resource leak when used from ProducerTemplate

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.16.0, 2.15.4
    • Fix Version/s: 2.15.5, 2.16.2, 2.17.0
    • Component/s: camel-ssh
    • Labels:
      None
    • Environment:

      Any OS, any hardware, tested with Spring-Boot.

    • Estimated Complexity:
      Unknown

      Description

      When using ProducerTemplate for execution of an ssh command (i.e. producerTemplate.requestBody("ssh://...", String.class)), 11 threads are being created, that are never killed. Any subsequent calls create new threads, eventually this exhausts memory and thread resources on the machine.
      These threads are not being killed even when explicitly stopping the ProducerTemplate.
      Here is a more detailed discussion, together with profiler results and code to reproduce the issue:

      http://stackoverflow.com/questions/33671567/spring-boot-camel-producertemplate-thousands-of-threads

      http://camel.465427.n5.nabble.com/Spring-Boot-Camel-producerTemplate-ssh-spawning-thousands-of-threads-td5773741.html

        Attachments

        1. testCamel9319.png
          275 kB
          Andrea Cosentino

          Activity

            People

            • Assignee:
              acosentino Andrea Cosentino
              Reporter:
              codan84 Daniel Gruszczyk
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: