User management is slow and times out. Runs out of memory.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • Component/s: None
    • None

      Summary

      When searching for groups or users, the User Management takes long to load and sometimes becomes unresponsive.
      A 500 error is shown for some requests

      Environment

      • User Management in Atlassian Cloud with more than 1500 users

      Cause

      The application "horde" that manages users, runs out of memory and restarts itself every now and then when performing searches. It normally takes 30 seconds to restart and searches work after that for a while. It automatically adds more memory up to 256mb but the problem persists.
      The cause is the amount of users and attributes being requested generates too much information that use all the memory.

      Steps to Reproduce

      1. Go to a user details
      2. Click on "Add group"
      3. start typing to search for groups

      Expected Results

      Groups are displayed in drop down

      Actual Results

      Spinning wheel keeps spinning. Request times out.

      Horde logs:

      2016-09-28 10:08:33,183 TP-Processor5 ERROR [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Java heap space
      java.lang.OutOfMemoryError: Java heap space
            at java.util.regex.Pattern$BnM.optimize(Pattern.java:5408)
            at java.util.regex.Pattern.compile(Pattern.java:1709)
            at java.util.regex.Pattern.<init>(Pattern.java:1351)
            at java.util.regex.Pattern.compile(Pattern.java:1028)
            at com.sun.jersey.api.uri.UriTemplateParser.<init>(UriTemplateParser.java:156)
            at com.sun.jersey.api.uri.UriTemplate.createURIComponent(UriTemplate.java:799)
            at com.sun.jersey.api.uri.UriTemplate.createURIWithStringValues(UriTemplate.java:775)
            at com.sun.jersey.api.uri.UriTemplate.createURIWithStringValues(UriTemplate.java:720)
            at com.sun.jersey.api.uri.UriTemplate.createURI(UriTemplate.java:663)
            at com.sun.jersey.api.uri.UriBuilderImpl._build(UriBuilderImpl.java:661)
            at com.sun.jersey.api.uri.UriBuilderImpl.build(UriBuilderImpl.java:641)
            at com.atlassian.crowd.plugin.rest.util.LinkUriHelper.buildEntityAttributeUri(LinkUriHelper.java:225)
            at com.atlassian.crowd.plugin.rest.util.EntityTranslator.toMultiValuedAttributeEntityList(EntityTranslator.java:347)
            at com.atlassian.crowd.plugin.rest.util.EntityTranslator.toUserEntity(EntityTranslator.java:99)
            at com.atlassian.crowd.plugin.rest.util.EntityTranslator.toUserEntities(EntityTranslator.java:137)
            at com.atlassian.crowd.plugin.rest.service.controller.SearchController.searchUsers(SearchController.java:180)
            at com.atlassian.crowd.plugin.rest.service.controller.SearchController.searchUsers(SearchController.java:80)
            at com.atlassian.crowd.plugin.rest.service.resource.SearchResource.search(SearchResource.java:72)
            at sun.reflect.GeneratedMethodAccessor317.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:497)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:83)
            at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
            at com.atlassian.plugins.rest.common.validation.ValidationInterceptor.intercept(ValidationInterceptor.java:71)
            at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
            at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:34)
            at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:110)
            at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:190)
            at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
            at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
      
      

       

      Notes

      The problem is being tracked by 2 internal bugs. See linked issues.

      Workaround

      Increase horde application memory. The application will not restart as often but it will still perform slowly until the issue is addressed.
       

            Assignee:
            Unassigned
            Reporter:
            Mauro Badii (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: