-
Bug
-
Resolution: Fixed
-
Highest
-
7.2.7, 7.3.9, 7.6.6, 7.13.5, 7.13.8, 8.5.4, 8.20.9, 9.4.2, 9.4.17
-
7.02
-
48
-
Severity 2 - Major
-
218
-
-
Summary
Creating a project in Jira can be slow, and, because Jira's front end enforces a 60 seconds timeout, even if the project creation completes successfully, if it does not do so within 60 seconds, the user will be presented with "Request timeout when creating project" error, and will not be redirected to the created project.
Environment
- Projects - 2000+
- Screens - 2000+
- Workflows - 1400+
Steps to Reproduce
- Create a project from Project template (eg. Scrum)
Expected Results
Project is created successfully under 60 seconds.
Actual Results
The page keeps on loading for 60 seconds then error appears on page: "Request timeout when creating project".
Several minutes after, the said project can be found in "View all projects" page.
Following is seen in atlassian-jira.log
2018-08-30 08:54:21,719 http-nio-8080-exec-3 url:/rest/project-t...ates/1.0/templates username:USERNAME INFO USERNAME 534x661x1 xxxxx 1.1.1.1 /rest/project-templates/1.0/templates [c.a.j.i.f.config.manager.FieldConfigSchemeManagerImpl] ConfigScheme TEST: Scrum Issue Type Scheme (43480). Created with no associated contexts 2018-08-30 08:54:54,624 http-nio-8080-exec-3 url:/rest/project-t...ates/1.0/templates username:USERNAME INFO USERNAME 534x661x1 xxxxx 1.1.1.1 /rest/project-templates/1.0/templates [c.a.jira.workflow.OSWorkflowManager] User 'USERNAME(USERNAME)' updated workflow 'Software Simplified Workflow for Project TEST' at 'Thu Aug 30 08:54:54 GMT 2018'
Notes
Reviewing access log will indicate that creating project took a long time (in this case 2 minutes 26 seconds)
10.193.106.21 534x661x1 USERNAME [30/Aug/2018:08:56:46 +0000] "POST /rest/project-templates/1.0/N HTTP/1.1" 200 139 146117 "https://jira/secure/Dashboard.jspa?selectPageId=32476" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36" "xxxxxx"
There are many SELECT queries to Database, focusing on the specific request ID 534x661x1
zul-mbp:logs zul$ grep 'http-nio-8080-exec-3' atlassian-jira-sql.log* | grep '534x661x1' | awk -F'(FROM|WHERE)' '/SELECT/{print $2}' | sort | uniq -c | sort -k1,1 -n ...... 39 projectroleactor 269 fieldlayout 269 fieldlayoutitem 269 fieldlayoutschemeentity 1194 workflowschemeentity 1673 fieldlayoutscheme 2401 permissionscheme 3541 workflowscheme 7255 nodeassociation 8094 fieldscreen
Compounding factor
- The problem scales with the project scheme complexity (for example, Jira Service Management can have up to 5 workflows per project, where as Jira Software has 1 workflow per project - meaning JSM is 5x slower than JSW), and, the amount of nodes in the cluster.
- If the node count > 1, then, cache flush events occur on the other nodes necessitating additional SELECT query to the db
- In addition to DB queries, there can be contention on the localq - as many cache events occur resulting in many writes to the localq queue files, stored on the LOCAL_HOME volume. If the disk latency is poor (for example, when using a slow disk, or slow network linked disk), this contributes to the project creation time. The expectation for cache writes to disk is 1ms.
- Jira's front-end Javascript code enforces a 60 seconds timeout. This is because the jQuery library being used to send the request to the server has been instructed to use a global 60 seconds timeout, in which the project creation code does not override.
Workaround
We can address the symptom at this stage, but not the cause.
To increase the project creation front-end timeout to 300000 ms (5 minutes), add to the Jira Announcement Banner:
<script> // // JRASERVER-67279 Workaround Start // $(document).ready(function() { //Modify the create project menu link let observer = new MutationObserver(function(mutation){ $('#project_template_create_link_lnk').on('click', function() { console.log("JRASERVER-67279 workaround triggered"); $.ajaxSetup({ timeout : 300000 }); }); }); let container = document.documentElement || document.body; observer.observe(container, { attributes: false, subtree: true, childList: true}); //Modify the Projects List page Create Button: $('#browse-projects-create-project').on('click', function() { console.log("JRASERVER-67279 workaround triggered"); $.ajaxSetup({ timeout : 300000 }); }); }); </script>
- is related to
-
JRASERVER-63784 Poor performance on project picker when there are over 3500 projects
- Closed
-
JRASERVER-71178 Concurrent invocation of updateFieldConfigScheme on FieldConfigSchemeManager may result in IssueTypeScheme and PriorityScheme to revert to default
- Closed
-
JRASERVER-70291 Project creation using shared config with Issue Scheme associated with large number of projects returned timeout error
- Gathering Impact
-
JRASERVER-61391 Upon loading any project for the first time, JIRA caches all components from all projects
- Gathering Impact
-
JRASERVER-68168 Make FieldLayoutCache population more efficient in Jira
- Gathering Interest
- relates to
-
JSWSERVER-11099 Creating sample project and board timeout
- Closed
-
JRASERVER-67972 CachingFieldScreenStore unnecessary flushes fieldScreenCache for create/remove operation
- Closed
-
PS-44843 Loading...
-
RAID-3177 Loading...
- causes
-
ACE-5684 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...