Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-67279

Request timeout when creating project

    XMLWordPrintable

Details

    • 7.02
    • 44
    • Severity 2 - Major
    • 45
    • Hide
      Atlassian Update – 13 June 2023

      Dear Customers,

      Thank you for taking the time to file and comment on this issue. We realize it still occurs and impacts your organization. We are now working on multiple customer requests and on new features, so we have to postpone our resolution of this issue. We’ve decided to move this issue to our long-term backlog.

      The workaround for this bug is as follows: Increase the project creation front-end timeout to 300000 ms (5 minutes), add to the Jira Announcement Banner. Please see ticket's description -> workaround section for details.

      Please continue watching this ticket for future updates and changes in the timeline that impacts your work.

      Best regards,

      Jakub Cegiel
      Jira DC Quality Engineering

      Show
      Atlassian Update – 13 June 2023 Dear Customers, Thank you for taking the time to file and comment on this issue. We realize it still occurs and impacts your organization. We are now working on multiple customer requests and on new features, so we have to postpone our resolution of this issue. We’ve decided to move this issue to our long-term backlog. The workaround for this bug is as follows: Increase the project creation front-end timeout to 300000 ms (5 minutes), add to the Jira Announcement Banner. Please see ticket's description -> workaround section for details. Please continue watching this ticket for future updates and changes in the timeline that impacts your work. Best regards, Jakub Cegiel Jira DC Quality Engineering

    Description

      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

      1. 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>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              emarghidan Eduard M
              Votes:
              55 Vote for this issue
              Watchers:
              70 Start watching this issue

              Dates

                Created:
                Updated: