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

Batch CSS and Javascript generation causes long delays in page loading after plugin modification

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

      Summary

      We're seeing an increasing number of issues where customers are reporting initial page load times in excess of 10-15 seconds, and sometimes more.

      Cause

      When accessing a page within JIRA, a set of batch.js and batch.css files are provided that contain the batched Javascript and CSS resources for the page. Upon first load of a page this cache is created (if it does not already exist on the server), and is then stored for future loads of the page. This cache is a server-side cache and is separate from the client-side cache (ie the cached batch.js and batch.css files in the browser). The creation of the cache can take some time - 10 to 15 seconds - so on first load of a page it will take some time for the page to load.

      On first load of any page in JIRA it does download quite a lot of content, which is then cached in the browser, so it is expected that the first page-load will be longer than any subsequent page loads. This is exacerbated when the cache is being recreated as it adds even more time onto that page load.

      The cache is created on a language/locale basis, so for example if users access a page in English it will be generated, and other users access pages in Russian it will be generated again. The cache is invalidated when there are Look & Feel changes, or plugin changes occur. This means if these changes occur the cache will need to be recreated and will cause page load times to increase until the cache is created and stored server-side. If there are users with a variety of different languages using the server it will mean the cache is recreated multiple times.

      In certain cases where multiple concurrent requests take place they can end up all running the batch generation simultaneously, leading to the CPU spiking and the instance potentially becoming unresponsive while all the requests are processed.

      Once a type of page has been visited per user (e.g. the dashboard, a JIRA issue or a project page) the batch.css will be cached for that type of page until the next restart or plugin change. So the first time you view one of these pages the performance will be slow, but it will improve significantly on each subsequent visit.

      Steps to reproduce

      1. Go to any JIRA instance - this can be easily replicated with a jira-dev instance
      2. Disable or enable a plugin
      3. Load the dashboard

      Looking at the Network tab of developer tools, you'll see that there's a long delay in loading those batch files.

      Workaround

      Schedule plugin changes during off-peak periods, and then visit a page in JIRA to ensure the cache is recreated during that off-peak period.

      Note: It is always best practice to schedule plugin installations and upgrades in off-peak periods or during maintenance windows. For JIRA Download customers it is also recommended to perform major plugin changes on a staging instance before it is done on a live environment.

      Diagnosis

      For one of the ways of identifying this problem, this will show us the number of threads waiting to process LESS compilation. A higher number over a series of thread dumps can be considered bad.

      The below is being executed in a folder with a significant number of thread dumps labelled jstack that were taken over a series of days.

      $ grep -B1 "com.atlassian.plugin.cache.filecache.impl.CachedFile.stream" jstack* |grep "waiting to lock" |awk '{print $1}' | sort |uniq -c
        31 jstack.13007.110759.851358689-
        58 jstack.13007.110810.528822009-
        54 jstack.13007.110821.172461523-
        42 jstack.4440.threadHigh.103649.939600529-
        44 jstack.4440.threadHigh.103701.620551473-
        48 jstack.4440.threadHigh.103713.178859435-
        51 jstack.4440.threadHigh.103724.736087099-
        57 jstack.4440.threadHigh.103736.376659166-
      

      Here we see the thread dumps taken over time continue to consistently have a higher number of threads most likely waiting to compile LESS. The below thread dump shows samples us the entire stack trace.

      Running thread
      "http-bio-8080-exec-281" daemon prio=10 tid=0x00007fe2041f0000 nid=0x349c runnable [0x00007fe4645d4000]
         java.lang.Thread.State: RUNNABLE
      	at org.mozilla.javascript.ScriptableObject.getSlot(ScriptableObject.java:2714)
      	at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:452)
      	at org.mozilla.javascript.IdScriptableObject.get(IdScriptableObject.java:329)
      	at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2184)
      	at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2261)
      	at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2251)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_50(less-concat.js:895)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_55(less-concat.js:1115)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_79(less-concat.js:1602)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_71(less-concat.js:1507)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_64(less-concat.js:1297)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_35(less-concat.js:655)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_28(less-concat.js:503)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
      	at org.mozilla.javascript.gen.setup_env_js_1._c_anonymous_2(setup-env.js:29)
      	at org.mozilla.javascript.gen.setup_env_js_1.call(setup-env.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_12(less-concat.js:221)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_223(less-concat.js:2702)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:338)
      	at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_65(less-concat.js:1330)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_69(less-concat.js:1408)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_35(less-concat.js:655)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_28(less-concat.js:503)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
      	at org.mozilla.javascript.gen.setup_env_js_1._c_anonymous_2(setup-env.js:29)
      	at org.mozilla.javascript.gen.setup_env_js_1.call(setup-env.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_12(less-concat.js:221)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_223(less-concat.js:2702)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:338)
      	at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_65(less-concat.js:1330)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_69(less-concat.js:1408)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_35(less-concat.js:655)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_28(less-concat.js:503)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
      	at org.mozilla.javascript.gen.setup_env_js_1._c_anonymous_2(setup-env.js:29)
      	at org.mozilla.javascript.gen.setup_env_js_1.call(setup-env.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_12(less-concat.js:221)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_223(less-concat.js:2702)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:338)
      	at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_65(less-concat.js:1330)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_69(less-concat.js:1408)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_35(less-concat.js:655)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
      	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
      	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
      	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_$_18(less-concat.js:261)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
      	at org.mozilla.javascript.gen.less_concat_js_2._c_anonymous_28(less-concat.js:503)
      	at org.mozilla.javascript.gen.less_concat_js_2.call(less-concat.js)
      	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
      	at org.mozilla.javascript.gen.setup_env_js_1._c_anonymous_11(setup-env.js:94)
      	at org.mozilla.javascript.gen.setup_env_js_1.call(setup-env.js)
      	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
      	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
      	at org.mozilla.javascript.gen.setup_env_js_1.call(setup-env.js)
      	at com.atlassian.jira.web.less.LessTransformer$LessCompiler.compile(LessTransformer.java:438)
      	at com.atlassian.jira.web.less.LessTransformer$LessResource.transform(LessTransformer.java:220)
      	at com.atlassian.plugin.webresource.transformer.CharSequenceDownloadableResource$1.apply(CharSequenceDownloadableResource.java:49)
      	at com.atlassian.plugin.webresource.transformer.CharSequenceDownloadableResource$1.apply(CharSequenceDownloadableResource.java:46)
      	at com.atlassian.plugin.webresource.transformer.TransformerUtils.transformAndStreamResource(TransformerUtils.java:40)
      	at com.atlassian.plugin.webresource.transformer.CharSequenceDownloadableResource.streamResource(CharSequenceDownloadableResource.java:45)
      	at com.atlassian.plugin.webresource.transformer.TransformerUtils.transformAndStreamResource(TransformerUtils.java:38)
      	at com.atlassian.plugin.webresource.AbstractTransformResource.streamResource(AbstractTransformResource.java:60)
      	at com.atlassian.plugin.webresource.transformer.TransformerUtils.transformAndStreamResource(TransformerUtils.java:38)
      	at com.atlassian.plugin.webresource.AbstractTransformResource.streamResource(AbstractTransformResource.java:60)
      	at com.atlassian.plugin.webresource.AbstractBatchDownloadableResource$2.writeStream(AbstractBatchDownloadableResource.java:115)
      	at com.atlassian.plugin.cache.filecache.impl.CachedFile.streamToCache(CachedFile.java:188)
      	at com.atlassian.plugin.cache.filecache.impl.CachedFile.doEnter(CachedFile.java:120)
      	- locked <0x00007fecb8a2b398> (a java.lang.Object)
      	at com.atlassian.plugin.cache.filecache.impl.CachedFile.stream(CachedFile.java:82)
      	at com.atlassian.plugin.cache.filecache.impl.FileCacheImpl.stream(FileCacheImpl.java:92)
      	at com.atlassian.plugin.webresource.cache.CacheHandle$Builder$2.stream(CacheHandle.java:48)
      	at com.atlassian.plugin.webresource.AbstractBatchDownloadableResource.streamResourceInternal(AbstractBatchDownloadableResource.java:125)
      	at com.atlassian.plugin.webresource.AbstractBatchDownloadableResource.serveResource(AbstractBatchDownloadableResource.java:97)
      	at com.atlassian.plugin.webresource.servlet.PluginResourceDownload.serveFile(PluginResourceDownload.java:96)
      	at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:33)
      ...
      
      Blocked thread sample
      "http-bio-8080-exec-283" daemon prio=10 tid=0x00007fe2041f4000 nid=0x349e waiting for monitor entry [0x00007fe4643d9000]
         java.lang.Thread.State: BLOCKED (on object monitor)
      	at com.atlassian.plugin.cache.filecache.impl.CachedFile.doEnter(CachedFile.java:115)
      	- waiting to lock <0x00007fecb8a2b398> (a java.lang.Object)
      	at com.atlassian.plugin.cache.filecache.impl.CachedFile.stream(CachedFile.java:82)
      	at com.atlassian.plugin.cache.filecache.impl.FileCacheImpl.stream(FileCacheImpl.java:92)
      	at com.atlassian.plugin.webresource.cache.CacheHandle$Builder$2.stream(CacheHandle.java:48)
      	at com.atlassian.plugin.webresource.AbstractBatchDownloadableResource.streamResourceInternal(AbstractBatchDownloadableResource.java:125)
      	at com.atlassian.plugin.webresource.AbstractBatchDownloadableResource.serveResource(AbstractBatchDownloadableResource.java:97)
      	at com.atlassian.plugin.webresource.servlet.PluginResourceDownload.serveFile(PluginResourceDownload.java:96)
      	at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:33)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at com.atlassian.jira.web.filters.XContentTypeOptionsNoSniffFilter.doFilter(XContentTypeOptionsNoSniffFilter.java:22)
      	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
      ...
      

        1. JIRA.png
          JIRA.png
          70 kB
        2. JIRA2.png
          JIRA2.png
          69 kB
        3. LESS Compilation.png
          LESS Compilation.png
          298 kB
        4. less-precompilation-comparison.png
          less-precompilation-comparison.png
          81 kB
        5. Screen Shot 2014-11-21 at 11.19.31 AM.png
          Screen Shot 2014-11-21 at 11.19.31 AM.png
          1.29 MB
        6. slow-batch-resource-requests.txt
          6 kB

            [JRASERVER-37337] Batch CSS and Javascript generation causes long delays in page loading after plugin modification

            Hi figarick,

            This issue was addressed in JIRA 6.3. Consequently, you will need to upgrade to at least JIRA 6.3 (or above) to see any notable differences here. If you need assistance/advice with the upgrade please contact us at https://support.atlassian.com and we'll be glad to help you there.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi figarick , This issue was addressed in JIRA 6.3. Consequently, you will need to upgrade to at least JIRA 6.3 (or above) to see any notable differences here. If you need assistance/advice with the upgrade please contact us at https://support.atlassian.com and we'll be glad to help you there. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            ArturP added a comment - - edited

            Hi.
            We've also faced this issue in ver. 5.2.11(https, sa server), and it seems like intranet users don't met this issue, only external users. Also this issue relates to number of active jira users, ours is about 300.

            ArturP added a comment - - edited Hi. We've also faced this issue in ver. 5.2.11(https, sa server), and it seems like intranet users don't met this issue, only external users. Also this issue relates to number of active jira users, ours is about 300.

            Hi yassine.mansour, please reach out to us at http://support.atlassian.com, that way we will able to troubleshoot and investigate what is wrong with your instance.

            Thanks in advance.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi yassine.mansour , please reach out to us at http://support.atlassian.com , that way we will able to troubleshoot and investigate what is wrong with your instance. Thanks in advance. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            YassineM added a comment -

            Problem Reoccurs on my Production environment (400 USERS Blocked) in 6.3.1. NOT NORMAL

            YassineM added a comment - Problem Reoccurs on my Production environment (400 USERS Blocked) in 6.3.1. NOT NORMAL

            Unfortunately, it's totally random, as long as there is an activity on the instance, of course. It's not admin changes that cause the problem, even if an action like a reindex or a "System info" increase the problem.

            Nicolas Esteves added a comment - Unfortunately, it's totally random, as long as there is an activity on the instance, of course. It's not admin changes that cause the problem, even if an action like a reindex or a "System info" increase the problem.

            MarkW added a comment -

            @Nicolas Do you know what actions you were performing when it happened? Can you check your audit logs to see if that can help tell you what admin changes were occurring?

            MarkW added a comment - @Nicolas Do you know what actions you were performing when it happened? Can you check your audit logs to see if that can help tell you what admin changes were occurring?

            Hello,

            I encounter a similar problem (bad performance caused by batch.css) but without a plugin modification. What do you think? Is it related? JIRA 6.3.15 / 6.3.10

            Regards,
            Nicolas.

            Nicolas Esteves added a comment - Hello, I encounter a similar problem (bad performance caused by batch.css) but without a plugin modification. What do you think? Is it related? JIRA 6.3.15 / 6.3.10 Regards, Nicolas.

            econnats It's possible that two users will have two different batches, thus requiring the batches to be built and cached for each user. An example of when this would happen is if the two users have a different locale set. However if two users have the same configuration, they can share batches.

            Bradley Ayers (Inactive) added a comment - econnats It's possible that two users will have two different batches, thus requiring the batches to be built and cached for each user. An example of when this would happen is if the two users have a different locale set. However if two users have the same configuration, they can share batches.

            Eddie Connatser added a comment - - edited

            Hi Richie, our company is running JIRA 6.3.15 in dev in prep for upgrading to this version, but we are experiencing the delays for the batch scripts that are mentioned in this JIRA.
            Are batch.js and batch.css cached per page type? OR Are batch.js and batch.css cached per page type per user?

            I'm wondering if let's say the "dashboard" batch.css and batch.js files are cached for user "A", if they will also need to be cached for user "B" (meaning each user has his/her own batch..css/js files cached on the server).

            Thanks,
            Eddie

            Eddie Connatser added a comment - - edited Hi Richie, our company is running JIRA 6.3.15 in dev in prep for upgrading to this version, but we are experiencing the delays for the batch scripts that are mentioned in this JIRA. Are batch.js and batch.css cached per page type? OR Are batch.js and batch.css cached per page type per user? I'm wondering if let's say the "dashboard" batch.css and batch.js files are cached for user "A", if they will also need to be cached for user "B" (meaning each user has his/her own batch..css/js files cached on the server). Thanks, Eddie

            Hey james.dempster , roman30, aich,

            Thanks for the feedback, but before we conclude that this is contributed by the said bug, our support engineers would like to help you further to identify the root cause.

            Please head towards the link below to create the ticket so that our support team can work on it:

            Select OnDemand Support if you are using JIRA Cloud and JIRA Support for JIRA Server.

            Looking forward to hear from you soon.

            PS: Thanks richard36 for sharing the workaround to benefit the community, and yes james.dempster, only JIRA Cloud has this feature and only we can make the changes.

            Regards,
            Richie Gee

            Richie Gee (Inactive) added a comment - Hey james.dempster , roman30 , aich , Thanks for the feedback, but before we conclude that this is contributed by the said bug, our support engineers would like to help you further to identify the root cause. Please head towards the link below to create the ticket so that our support team can work on it: https://support.atlassian.com/customer/servicedesk-portal Select OnDemand Support if you are using JIRA Cloud and JIRA Support for JIRA Server. Looking forward to hear from you soon. PS: Thanks richard36 for sharing the workaround to benefit the community, and yes james.dempster , only JIRA Cloud has this feature and only we can make the changes. Regards, Richie Gee

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              nmason Nick Mason
              Affected customers:
              76 This affects my team
              Watchers:
              141 Start watching this issue

                Created:
                Updated:
                Resolved: