Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-4609

RemoteSiteListener creates and starts worker threads without bound.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      MiNiFI C++ will continually attempt to reconnect to a NiFi instance. In RemoteSiteListener if something happens to the connection the thread does not appear to go away and it is unbounded. So if you had many connections come in, thread.start will create n threads without bound. This was experienced on an RPI where something happened to the connection and we abandoned it on MiNiFi C++ ( but socket hasn't been closed yet). Since we don't have insight into what's occurring on the server side we make an attempt to reconnect, thus creating a new Thread.

      Might suggest an ExecutorService to coordinate these threads and potentially an AfterExecute to perform some accounting for visibility.

      https://github.com/apache/nifi/blob/45f82dc855177702a0c1a0e4c38af334b713c278/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/SocketRemoteSiteListener.java#L310

      jeremy.dyer can provide additional insight.

      Attachments

        Activity

          People

            markap14 Mark Payne
            phrocker Marc Parisi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: