Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-11804

Change DefaultPermissionVoterFactory's cache to avoid OutOfMemoryErrors

    XMLWordPrintable

    Details

      Description

      The DefaultPermissionVoterFactory caches user permissions as PermissionVoters using a RequestLocalCache. Unfortunately, RequestLocalCache is unbounded. Certain requests may cause a large number of permission objects to be loaded into memory and cached until the request completes.

      There is certainly reason for keeping the current user's PermissionVoter around until the request is completed but we may want to limit how many other user objects are kept in cache.

      Workaround
      Increasing the maximum Java heap size (-Xmx) may avoid an OutOfMemoryError associated with this problem

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ysun Yingran Sun
              Reporter:
              bplump Brent P
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: