Issue Summary

      There's warnings being triggered on the latest JSD version due to the `RequestCacheImpl` being used outside of a request thread by the `SdSerialisedOffThreadProcessor`. This will not work in the future, so we need to fix it.

      Steps to Reproduce

      1. Install JSD v4.9.1

      The below exception is thrown in the atlassian-jira.log file:

      SdSerialisedOffThreadProcessor:thread-4 WARN [c.a.j.cache.request.RequestCacheImpl] Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtil for details.
      

      Workaround

      Setting the log level of the com.atlassian.jira.cache.request.RequestCacheImpl package to ERROR per the documentation Logging and profiling

      This configuration will filter out relevant warnings as well.

      Temporary way to set the package to ERROR (this setting will go away after a Jira restart)

      • In Jira, go to âš™ > System > Logging and profiling page
      • Scroll down to Default Loggers > Configure logging level for another package, and add com.atlassian.jira.cache.request.RequestCacheImpl package with the ERROR level

      Permanent way to set the package to ERROR (this setting will remain after a Jira restart)

      • Edit the file <JIRA_INSTALLATION>/atlassian-jira/WEB-INF/classes/log4j.properties
      • Add the 2 following lines at the end of the file and save it:
        log4j.logger.com.atlassian.jira.cache.request.RequestCacheImpl = ERROR, filelog
        log4j.additivity.com.atlassian.jira.cache.request.RequestCacheImpl = false
        
      • Restart the Jira application

            [JSDSERVER-6897] RequestCache being used in an invalid context

            intl added a comment -

            Have same issue on upgrading from 8.7.0 to 8.11

            Also, Jira could not load successful with this error: 

            System plugins failed to start: We haven't been able to start all the required system plugins

            We couldn't start the following plugins:

            • Atlassian Jira - Plugins - Project Config Plugin (com.atlassian.jira.jira-project-config-plugin)
            • Atlassian JIRA - Plugins - Quick Edit Plugin (com.atlassian.jira.jira-quick-edit-plugin)

            intl added a comment - Have same issue on upgrading from 8.7.0 to 8.11 Also, Jira could not load successful with this error:  System plugins failed to start: We haven't been able to start all the required system plugins We couldn't start the following plugins: Atlassian Jira - Plugins - Project Config Plugin (com.atlassian.jira.jira-project-config-plugin) Atlassian JIRA - Plugins - Quick Edit Plugin (com.atlassian.jira.jira-quick-edit-plugin)

            Tom Lister added a comment - - edited

            we have the same issue upgrading from 8.5.1 to 8.9.1

            Centos on AWS, data center

            Tom Lister added a comment - - edited we have the same issue upgrading from 8.5.1 to 8.9.1 Centos on AWS, data center

            We have same issue by upgrading Jira 7.10.1 to 8.11.0

            Abdelkader Boumediene added a comment - We have same issue by upgrading Jira 7.10.1 to 8.11.0

            And since the problem still is present, Atlassian created another bug report https://jira.atlassian.com/browse/JSWSERVER-20643

            Christopher Schommer added a comment - And since the problem still is present, Atlassian created another bug report  https://jira.atlassian.com/browse/JSWSERVER-20643

            We are running on Debian 10, same problem  

            Julian from AF added a comment - We are running on Debian 10, same problem  

            We are running on Ubuntu and experiencing the same issue(s)

            Heiko Gerlach added a comment - We are running on Ubuntu and experiencing the same issue(s)

            Dawn Fama added a comment -

            Is everyone running Jira on windows as a service?  Could this be a java parameter (registry) that is no longer supported by java 11?

            Dawn Fama added a comment - Is everyone running Jira on windows as a service?  Could this be a java parameter (registry) that is no longer supported by java 11?

            Christopher Schommer added a comment - - edited

            Jira 8.11 seems to fix it for this package, but there are other Jira components with the same problem. Now, I can also find the following entry in the log

             

            2020-07-16 10:16:12,160+0000 JMXInstrumentsLoggingService RUNNING WARN [c.a.j.cache.request.RequestCacheImpl] From Jira 9.0 version creation/usage of RequestCacheImpl will throw the IllegalStateException.
            

             

            Christopher Schommer added a comment - - edited Jira 8.11 seems to fix it  for this package , but there are other Jira components with the same problem. Now, I can also find the following entry in the log   2020-07-16 10:16:12,160+0000 JMXInstrumentsLoggingService RUNNING WARN [c.a.j.cache.request.RequestCacheImpl] From Jira 9.0 version creation/usage of RequestCacheImpl will throw the IllegalStateException.  

            Dawn Fama added a comment -

            Same problem after upgrading Jira to 8.10 and JSD to 4.10

            Dawn Fama added a comment - Same problem after upgrading Jira to 8.10 and JSD to 4.10

            I've the exact same issue here.
            My setup is totally fresh and no extra add-ons are installed.

             

            The bigger problem is that my log folder increases extreme fast and without intervention my disk will fill up....

            Stephan Wenderlich added a comment - I've the exact same issue here. My setup is totally fresh and no extra add-ons are installed.   The bigger problem is that my log folder increases extreme fast and without intervention my disk will fill up....

              kkanojia Kunal Kanojia
              sdegroot@atlassian.com Steven de Groot
              Affected customers:
              50 This affects my team
              Watchers:
              69 Start watching this issue

                Created:
                Updated:
                Resolved: