Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-18668

Improve database startup checks to catch SQLException when asking for the Connection

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      When starting up if the database is not available, we log it in the database consistency check, but then carry on. We call it later and the resulting exception completely stops the application from loading. Doing the check means JIRA will at least startup locked and show the error.

      Propose adding the following to the beginning of DatabaseConsistencyCheck.isOk()

      DatabaseConsistencyCheck {
          ...
          public boolean isOk()
          {
              try
              {
                  jiraConnectionFactory.getConnection();
              }
              catch (final SQLException e)
              {
                  final String message = "Cannot get connection to the database";
                  log.error(message, e);
                  faultDescription = message + ": " + e;
                  faultDescriptionHtml = faultDescription;
                  return false;
              }
              ...
          }
      

      We need to test this on the supported application servers (especially JBoss) due to previous experience of funkiness in this area.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jed Jed Wesley-Smith (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: