Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-16596

Diffing page content via rss causes high load

    XMLWordPrintable

Details

    Description

      As mentioned in CONF-17499, some pages take a long time to diff. In Confluence instances where RSS is used widely, the result of such a page being updated can result in a great amount of requests to diff that page. Thread dumps will have many entries from createrssfeed.action actions like this one:

      "TP-Processor23" daemon prio=10 tid=0x088a9000 nid=0x6fbe runnable [0x5f9b7000..0x5f9bada0]
        java.lang.Thread.State: RUNNABLE
      	at org.apache.commons.jrcs.diff.myers.PathNode.previousSnake(PathNode.java:123)
      	at org.apache.commons.jrcs.diff.myers.DiffNode.<init>(DiffNode.java:45)
      	at org.apache.commons.jrcs.diff.myers.MyersDiff.buildPath(MyersDiff.java:153)
      	at org.apache.commons.jrcs.diff.myers.MyersDiff.diff(MyersDiff.java:93)
      	at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:197)
      	at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:185)
      	at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:165)
      	at com.atlassian.confluence.diff.DeltaRanker.getChangeRanking(DeltaRanker.java:27)
      	at com.atlassian.confluence.diff.LineRanker.getIndexOfSmallestChange(LineRanker.java:30)
      	at com.atlassian.confluence.diff.LineLevelDiffer.getChunksForChangedLines(LineLevelDiffer.java:214)
      	at com.atlassian.confluence.diff.LineLevelDiffer.diff(LineLevelDiffer.java:91)
      	at com.atlassian.confluence.diff.LineLevelDiffer.diff(LineLevelDiffer.java:346)
      	at com.atlassian.confluence.diff.LineLevelDiffer.diff(LineLevelDiffer.java:333)
      	at com.atlassian.confluence.diff.ConfluenceDiff.<init>(ConfluenceDiff.java:22)
      	at com.atlassian.confluence.diff.ConfluenceDiff.<init>(ConfluenceDiff.java:29)
      	at com.atlassian.confluence.rss.PageRenderSupport.getDiff(PageRenderSupport.java:98)
      	at com.atlassian.confluence.rss.PageRenderSupport.getRenderedContent(PageRenderSupport.java:64)
      	at com.atlassian.confluence.rss.DefaultFeedBuilder.createFeed(DefaultFeedBuilder.java:103)
      	at sun.reflect.GeneratedMethodAccessor628.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy62.createFeed(Unknown Source)
      	at com.atlassian.confluence.spaces.actions.CreateRssFeedAction.getSyndFeed(CreateRssFeedAction.java:51)
      

      To address this in Confluence 3.1, a limit was introduced to the maximum number of concurrent diffs. When that number is exceeded, additional attempts by RSS feeds to create diffs are ignored and logged. (The RSS requests succeed, they are just missing diffs).

      Option configuration

      The size of the threadpool defaults to 20, and can be configured with the system property "confluence.diff.pool.size".
      The default timeout is 1000 ms, and can be configured with the system property "confluence.diff.timeout".

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dcheney David Cheney (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: