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

Confluence page timeout does not terminate active threads once limit is reached

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Medium
    • None
    • 5.9.3, 5.9.7, 5.10.1
    • Content - Page

    Description

      Summary

      Confluence page timeout does not terminate active threads once limit is reached.

      Steps to Reproduce

      1. Go to -> General configuration -> Security Configuration
      2. Edit the Page Timeout to 1 second for testing purposes
      3. The issue happens with any long running threads. This is easiest to show using the SQL For Confluence Macro since we can use benchmark queries to demostrate the issue. Download the add-on and install in Confluence.
      4. Configure a datasource for the add-on.
      5. Create a page and use Insert -> Markup to add the following wiki markup depending on the database you have. Save the page.

      For Postgres:

      {sql-query:dataSource=example} select pg_sleep(5);{sql-query}

      For MySQL:

      {sql-query:dataSource=example} SELECT SLEEP(15);{sql-query}

      Expected Results

      The page timeout happens after 1 seconds and any threads for content on the page will be terminated.

      Actual Results

      Notice the page timeout will not happen after one second as configured and taking a thread dump after 1 seconds shows that the add-on is still running.

      Thread Dump After Page Timeout Should Have Ended
      "http-nio-8090-exec-4" #39 daemon prio=5 os_prio=31 tid=0x00007fed54b69000 nid=0x9c03 runnable [0x000000012700e000]
         java.lang.Thread.State: RUNNABLE
      	at java.net.SocketInputStream.socketRead0(Native Method)
      	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
      	at java.net.SocketInputStream.read(SocketInputStream.java:170)
      	at java.net.SocketInputStream.read(SocketInputStream.java:141)
      	at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:143)
      	at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:112)
      	at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:71)
      	at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:282)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1741)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
      	- locked <0x00000007a22ea418> (a org.postgresql.core.v3.QueryExecutorImpl)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)
      	at org.swift.confluence.sql.SqlDataHelper.process(SqlDataHelper.java:208)
      	at org.swift.confluence.sql.SqlMacro.process(SqlMacro.java:225)
      	at org.swift.confluence.sql.SqlMacro.execute(SqlMacro.java:174)
      

      Notes

      We have seen some very long running threads keep running after the page timeout should have ended (up to an hr).

      Attachments

        Activity

          People

            Unassigned Unassigned
            ajean Andy J.
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: