Thread Limit health check incorrectly fails if the maximum running user processes is equal to 4096

XMLWordPrintable

    • 7.02
    • 54
    • Severity 3 - Minor
    • 84

      Summary

      The ThreadLimitHealthCheck class is incorrectly failing environments where the number of user processes configured is =4096. This is incorrect and not consistent with the recommendations to set this to >= 4096.

      There may be scenarios where admins will configure this to 4096 and the test will fail.

      Steps to Reproduce

      1. Set up a JIRA instance with user processes set to 4096
      2. Run the JIRA health check

      Expected Results

      1. The check passes

      Actual Results

      The below warning is thrown in the healthcheck:

      The maximum number of processes for the user account running JIRA is currently 4096, which can cause performance issues. We recommend increasing this to at least 4,096.
      

      Notes

      The SupportHealthStatus check() call is incorrectly doing a conditional check for

      if (threadLimit.get().greaterThan(MIN_THREAD_LIMIT))

      when it should be doing it as >=.

      public SupportHealthStatus check() {
              final Optional<FileSystemInfo.ThreadLimit> threadLimit = fileSystemInfo.getThreadLimit();
              if (threadLimit.isPresent()) {
                  if (threadLimit.get().greaterThan(MIN_THREAD_LIMIT)) {
                      return healthStatusFactory.healthy(i18nResolver.getText("healthcheck.threadlimit.valid",
                              application.name(), MIN_THREAD_LIMIT));
                  } else {
                      return healthStatusFactory.failed(i18nResolver.getText("healthcheck.threadlimit.fail",
                              application.name(), threadLimit.get().toString(), MIN_THREAD_LIMIT), WARNING);
                  }
              }
              return healthStatusFactory.healthy(i18nResolver.getText("healthcheck.threadlimit.undefined",
                      application.name(), MIN_THREAD_LIMIT));
          }

      Fix

      Upgrade the JIRA Instance Health add-on to the latest version using Manage add-ons.

            Assignee:
            Unassigned
            Reporter:
            Andy J.
            Votes:
            10 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: