-
Bug
-
Resolution: Fixed
-
Medium
-
6.4, 6.4.5, 6.4.12, 6.4.13
-
None
-
6.04
-
Summary
Project view page loading is very slow with million issues, 2,500 projects and 1,500 boards. In this specific bug report, this is due to the Project Versions not being cached. Instances with large number of Versions are affected, example:
Versions: 12416 Versions: 19755 Versions: 16263
Environment
- JIRA 6.4.5
- JIRA Agile 6.7.6
- MySQL 5.6.x
Expected Results
Faster project view page loading less than 130 seconds (at least a half of the current result).
Actual Results
Actual project view page loading is around 130 seconds.
Verification
Taking thread dumps as per Generate a Thread Dump during problematic periods of slowness, and searching for the below stack traces can indicate this is a problem:
"catalina-ssl-exec-1" daemon prio=10 tid=0x00002b9068fe1000 nid=0x1ae1 runnable [0x00002b906f190000] java.lang.Thread.State: RUNNABLE at java.util.HashMap.putAllForCreate(HashMap.java:558) at java.util.HashMap.<init>(HashMap.java:298) at org.ofbiz.core.entity.GenericValue.copyOriginalDbValues(GenericValue.java:129) at org.ofbiz.core.entity.EntityListIterator.currentGenericValue(EntityListIterator.java:173) at org.ofbiz.core.entity.EntityListIterator.next(EntityListIterator.java:246) at org.ofbiz.core.entity.EntityListIterator.getCompleteList(EntityListIterator.java:308) at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:740) at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:150) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:901) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:879) at org.ofbiz.core.entity.GenericDelegator.findAll(GenericDelegator.java:802) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findAll(DefaultOfBizDelegator.java:361) at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.findAll(WrappingOfBizDelegator.java:206) at com.atlassian.jira.project.version.OfBizVersionStore.getAllVersions(OfBizVersionStore.java:44) at com.atlassian.jira.project.version.OfBizVersionStore.getVersionsByName(OfBizVersionStore.java:64) at com.atlassian.jira.project.version.CachingVersionStore$3.load(CachingVersionStore.java:71) at com.atlassian.jira.project.version.CachingVersionStore$3.load(CachingVersionStore.java:66) at com.atlassian.cache.memory.MemoryCacheManager$3$1.load(MemoryCacheManager.java:137) at com.atlassian.cache.memory.BlockingCacheLoader.load(BlockingCacheLoader.java:51) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3573) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313) - locked <0x000000047c77c6b8> (a com.google.common.cache.LocalCache$StrongEntry) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228) at com.google.common.cache.LocalCache.get(LocalCache.java:3970) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4834) at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:316) at com.atlassian.jira.project.version.CachingVersionStore.getVersionsByName(CachingVersionStore.java:148) at com.atlassian.jira.project.version.DefaultVersionManager.getVersionsByName(DefaultVersionManager.java:577) at com.atlassian.jira.jql.resolver.VersionResolver.getIdsFromName(VersionResolver.java:30) at com.atlassian.jira.jql.resolver.VersionIndexInfoResolver.getIndexedValues(VersionIndexInfoResolver.java:29) at com.atlassian.jira.jql.query.AbstractOperatorQueryFactory.getIndexValues(AbstractOperatorQueryFactory.java:66) at com.atlassian.jira.jql.query.AbstractEqualityQueryFactory.createQueryForSingleValue(AbstractEqualityQueryFactory.java:34) at com.atlassian.jira.jql.query.GenericClauseQueryFactory.getQuery(GenericClauseQueryFactory.java:72) at com.atlassian.jira.jql.query.FixForVersionClauseQueryFactory.getQuery(FixForVersionClauseQueryFactory.java:41) at com.atlassian.jira.plugins.issue.create.context.jql.LuceneHelpers$$anonfun$getValueFromLuceneSearcher$1.apply(LuceneHelpers.scala:35) at com.atlassian.jira.plugins.issue.create.context.jql.LuceneHelpers$$anonfun$getValueFromLuceneSearcher$1.apply(LuceneHelpers.scala:34) at scala.Option.flatMap(Option.scala:170) at com.atlassian.jira.plugins.issue.create.context.jql.LuceneHelpers$class.getValueFromLuceneSearcher(LuceneHelpers.scala:34) at com.atlassian.jira.plugins.issue.create.context.fields.FixVersionJQLInputMapper.getValueFromLuceneSearcher(FixVersionJQLInputMapper.scala:10) at com.atlassian.jira.plugins.issue.create.context.jql.LuceneHelpers$class.getValueFromLuceneSearcher(LuceneHelpers.scala:28) at com.atlassian.jira.plugins.issue.create.context.fields.FixVersionJQLInputMapper.getValueFromLuceneSearcher(FixVersionJQLInputMapper.scala:10) at com.atlassian.jira.plugins.issue.create.context.fields.helpers.GenericClauseInputMapper$$anonfun$apply$1.apply(GenericClauseInputMapper.scala:13) at com.atlassian.jira.plugins.issue.create.context.fields.helpers.GenericClauseInputMapper$$anonfun$apply$1.apply(GenericClauseInputMapper.scala:12) at scala.Option.flatMap(Option.scala:170) at com.atlassian.jira.plugins.issue.create.context.fields.helpers.GenericClauseInputMapper$class.apply(GenericClauseInputMapper.scala:12) at com.atlassian.jira.plugins.issue.create.context.fields.FixVersionJQLInputMapper.apply(FixVersionJQLInputMapper.scala:10) at com.atlassian.jira.plugins.issue.create.context.InputParamsBuilder$$anonfun$mapEntry$1.applyOrElse(InputParamsBuilder.scala:106) at com.atlassian.jira.plugins.issue.create.context.InputParamsBuilder$$anonfun$mapEntry$1.applyOrElse(InputParamsBuilder.scala:105) at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) at scala.Option.collect(Option.scala:250) ....
The stack trace may differ given the version and also database used - the specific class to look for is com.atlassian.greenhopper.web.sidebar.AgileBoardScopeFilterContextProvider.getContext(AgileBoardScopeFilterContextProvider.java:27).
Notes
There is a possible bottleneck when user tries to open the project view page. And it is related to Project Versions. Basically when JIRA fetches project versions it makes subsequent calls to DB for each version and selects all values from the table (no cache), after that it iterates through selected version values and filters them. It could be a problem when JIRA has more than a million issues, 2,500 projects and 1,500 boards.
Workaround
Use the following steps below.
- Disable the board-scope-filter module in JIRA Agile Add-on (board-scope-filter module tells the sidebar the list of boards to show on the board dropdown as well as the board that is currently selected.).
- Navigate through Administration menu > Add-ons > Manage Add-ons > Select 'JIRA Agile'
- Expand the JIRA Agile Add-on modules
- Find the 'board-scope-filter' module and disable it.
- Disable Project Navigation (Sidebar project navigation) for all users: Administration Menu > System > Project Navigation
- is caused by
-
JRASERVER-62666 JIRA method getVersionsByName inefficiently populates the cache
- Closed
- is related to
-
JRASERVER-43347 Project sidebar causes slow performance with a large number of Agile boards
- Closed
- relates to
-
JRASERVER-62513 all JIRA threads is blocked waiting for cache getProjectContextIdsForQuery
- Gathering Impact
- included in
-
CPU-408 JIRA 7.2.0-OD-04-029
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
- was cloned as
-
SW-2709 Loading...