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

Change DefaultPermissionVoterFactory's cache to avoid OutOfMemoryErrors

XMLWordPrintable

      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

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

              Created:
              Updated:
              Resolved: