Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-15295

JIRA Software Viewing All Boards can timeout due to resolving project list for each loaded board

    XMLWordPrintable

Details

    Description

      Summary

      When browsing to 'All Boards' it's possible the 1min Ajax timeout in JIRA kicks in, preventing the board list from loading. This will result in a timeout as per the attached screenshot.
      Problem is caused by slow response to call rest/greenhopper/1.0/rapidviews/viewsData from JIRA, which does resolving project list for each loaded board.

      Environment

      Reproduced with the following instance size:

      • Projects: 1k+
      • Boards: 1k+

      Steps to Reproduce

      1. Use a large instance, such as above.
      2. Access the All boards page

      Expected Results

      • Viewing Rapid Boards responds in a reasonable time frame (less then 1 minute)

      Actual Results

      The ajax timeout kicks in and the page times out whilst waiting for rest/greenhopper/1.0/rapidviews/viewsData to return results, or the board can take > 1 minute to load.

      Notes

      • Regression was introduced in JIRA Software 7.1.0
      • RapidViewProjectHelper.getRapidViewProjectList is called for every RapidView query visible on "All boards" page. Underneath this method requests the list of all available projects: getAllProjectsForAction goes through every single project and filters them out by given permissions.

      Verification

      Generate a thread-dump and following will be present in the stacktrace for long-running threads:

      • There should be slow running thread related /rest/greenhopper/1.0/rapidviews/viewsData call
      • Class com.atlassian.greenhopper.web.rapid.view.RapidViewListResource.getViewsAndConfigModel will be present in the stacktrace for long-running threads together with com.atlassian.jira.bc.project.DefaultProjectService.getAllProjectsForAction:
        "http-nio-80-exec-125" #126716 daemon prio=5 os_prio=0 tid=0x0000000055262000 nid=0x1eac runnable [0x0000000079d6a000]
           java.lang.Thread.State: RUNNABLE
        	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
        	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4739)
        	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:173)
        	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:158)
        	at com.atlassian.jira.security.roles.CachingProjectRoleAndActorStore.getProjectRoleActors(CachingProjectRoleAndActorStore.java:118)
        	at com.atlassian.jira.security.roles.DefaultProjectRoleManager.getProjectRoleActors(DefaultProjectRoleManager.java:107)
        	at com.atlassian.jira.notification.type.ProjectRoleSecurityAndNotificationType.getProjectRoleActors(ProjectRoleSecurityAndNotificationType.java:188)
        	at com.atlassian.jira.notification.type.ProjectRoleSecurityAndNotificationType.hasPermission(ProjectRoleSecurityAndNotificationType.java:141)
        ...
        	at com.atlassian.jira.bc.project.ProjectAction.hasPermission(ProjectAction.java:60)
        	at com.atlassian.jira.bc.project.DefaultProjectService.checkActionPermission(DefaultProjectService.java:947)
        	at com.atlassian.jira.bc.project.DefaultProjectService$1.apply(DefaultProjectService.java:765)
        	at com.atlassian.jira.bc.project.DefaultProjectService$1.apply(DefaultProjectService.java:762)
        	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:652)
        	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        	at com.google.common.collect.Iterators.addAll(Iterators.java:361)
        	at com.google.common.collect.Lists.newArrayList(Lists.java:160)
        	at com.google.common.collect.Lists.newArrayList(Lists.java:144)
        	at com.atlassian.jira.bc.project.DefaultProjectService.getAllProjectsForAction(DefaultProjectService.java:768)
        ...
        	at com.atlassian.greenhopper.web.rapid.view.RapidViewProjectHelper.getRapidViewProjectList(RapidViewProjectHelper.java:58)
        	at com.atlassian.greenhopper.web.rapid.view.RapidViewFilterHelper.buildSavedFilterEntry(RapidViewFilterHelper.java:281)
        	at com.atlassian.greenhopper.web.rapid.view.RapidViewListHelper.buildListEntry(RapidViewListHelper.java:215)
        	at com.atlassian.greenhopper.web.rapid.view.RapidViewListHelper.buildListModel(RapidViewListHelper.java:156)
        	at com.atlassian.greenhopper.web.rapid.view.RapidViewListHelper.buildListAndConfigModel(RapidViewListHelper.java:105)
        ...
        	at com.atlassian.greenhopper.web.rapid.view.RapidViewListResource.getViewsAndConfigModel(RapidViewListResource.java:74)
        ...
        

      Workaround

      You can increase the timeout as mentioned in How to change the default AJAX timeout in JIRA.

      Attachments

        Issue Links

          Activity

            People

              pbugalski Pawel Bugalski (Inactive)
              ayakovlev@atlassian.com Andriy Yakovlev [Atlassian]
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: