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

SshClient resource leak when used from ProducerTemplate

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.16.0, 2.15.4
    • 2.15.5, 2.16.2, 2.17.0
    • camel-ssh
    • None
    • Any OS, any hardware, tested with Spring-Boot.

    • 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

        Activity

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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment