Uploaded image for project: 'JBoss Remoting (3+)'
  1. JBoss Remoting (3+)
  2. REM3-208

ByteBuffer leaks via HttpUpgradeConnectionProvider and RemoteConnectionProvider

    XMLWordPrintable

Details

    • Workaround Exists
    • Hide

      Use -Djboss.remoting.pooled-buffers=false on the command line to disable the byte buffer pooling.

      Show
      Use -Djboss.remoting.pooled-buffers=false on the command line to disable the byte buffer pooling.

    Description

      ByteBufferSlicePool uses a ThreadLocal-based ByteBuffer caching scheme that pretty much results in uncollectable ByteBuffers. That's ok, if the number of ByteBufferSlicePool instances is limited, which I believe was the design intent.

      But HttpUpgradeConnectionProvider is not limiting the number of instances. One is created per channel creation, in ConnectionAdaptorImpl.adapt(). This is the cause of WFLY-4881.

      Possible solution is to cache the ByteBufferSlicePool in the outer HttpUpgradeConnectionProvider and reuse it for each ConnectionAdaptorImpl.adapt call.

      RemoteConnectionProvider.connect also creates a pool for each connect call. Perhaps it could be cached in RemoteConnectionProvider and reused.

      David in chat mentioned switching to using global pools as the solution.

      Attachments

        Issue Links

          Activity

            Public project attachment banner

              context keys: [headless, issue, helper, isAsynchronousRequest, project, action, user]
              current Project key: REM3

              People

                dlloyd@redhat.com David Lloyd
                bstansbe@redhat.com Brian Stansberry
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: