One of Advance Roadmap plan takes significantly longer time to load than the plan
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This article describes a scenario where one of the Advance Roadmap plan takes almost 6 minutes to load, while the other Roadmap plans loads quickly.
Environment
Jira Software 9.12.x , Jira Software 10.x
Diagnosis
Users can generate the har file and check the time required to complete the request
In this case it is observed that request takes around 3 minute to complete. Status is 200.
As we have observed the issue is from server side, to further diagnose the problem, generated thread dumps. For more information on generation of thread dumps please refer documentation.
Thread-dump shows, the request is waiting for response from Database. Thus slowness is from Database.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
04:05:52 - http-nio-8051-exec-111 url:/secure/PortfolioPlanView.jspa; user: someUser
State: RUNNABLE
CPU usage: 0.00%
Running for: 226:22.32
Waiting for
This thread is not waiting for notification on any lock
Locks held
This thread holds [0x7F8026172900, 0x7f8026470840, 0x7f8026470840]
Stack trace
java.net.SocketInputStream.socketRead0(java.base@11.0.19/Native Method)
java.net.SocketInputStream.socketRead(java.base@11.0.19/SocketInputStream.java:115)
java.net.SocketInputStream.read(java.base@11.0.19/SocketInputStream.java:168)
java.net.SocketInputStream.read(java.base@11.0.19/SocketInputStream.java:140)
com.mysql.cj.protocol.ReadAheadInputStream.fill(ReadAheadInputStream.java:107)
com.mysql.cj.protocol.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:150)
com.mysql.cj.protocol.ReadAheadInputStream.read(ReadAheadInputStream.java:180)
java.io.FilterInputStream.read(java.base@11.0.19/FilterInputStream.java:133)
com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:64)
com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:81)
com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63)
com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45)
com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:52)
com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:41)
com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:54)
com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:44)
com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:576)
com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:762)
com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:701)
com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:1052)
com.mysql.cj.NativeSession.execSQL(NativeSession.java:657)
com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:893)
com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:972)
org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
com.atlassian.jira.ofbiz.sql.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:42)
com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.lambda$executeQuery$5(DiagnosticPreparedStatement.java:59)
com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement$$Lambda$4319/0x00007f77c94db058.execute(Unknown Source)
com.atlassian.diagnostics.internal.platform.monitor.db.DefaultDatabaseDiagnosticsCollector.recordExecutionTime(DefaultDatabaseDiagnosticsCollector.java:91)
com.atlassian.jira.diagnostic.connection.DatabaseDiagnosticsCollectorDelegate.recordExecutionTime(DatabaseDiagnosticsCollectorDelegate.java:62)
com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.executeQuery(DiagnosticPreparedStatement.java:59)
org.ofbiz.core.entity.jdbc.SQLProcessor.executeQuery(SQLProcessor.java:543)
org.ofbiz.core.entity.GenericDAO.createEntityListIterator(GenericDAO.java:882)
org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:862)
org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:734)
org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:166)
org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:913)
org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:891)
com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:92)
com.atlassian.jira.ofbiz.WrappingOfBizDelegator.findByAnd(WrappingOfBizDelegator.java:73)
com.atlassian.jira.issue.customfields.manager.DefaultOptionsManager.findByParentId(DefaultOptionsManager.java:189)
com.atlassian.jira.issue.customfields.manager.CachedOptionsManager.access$801(CachedOptionsManager.java:31)
From thread-dump stack-trace we find that there is a database request from findByParentId method of DefaultOptionsManager class.
1
com.atlassian.jira.issue.customfields.manager.DefaultOptionsManager.findByParentId(DefaultOptionsManager.java:189)
Solution
As slowness was observed for findByParentId, we checked the indexes for the respective table.
Problem was resolved after creating database table Index on parentoptionid column of table customfieldoption.
Following query can be used to create this index on Mysql Database.
1
CREATE INDEX idx_parentoptionid ON customfieldoption (parentoptionid);
Was this helpful?