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

The Socket Timeout in General Configuration doesn't override the SAL timeout

    XMLWordPrintable

Details

    Description

      If JIRA takes more than the default timeout in SAL (10 seconds) then anything that uses the application link, such as the JIRA Issues Macro or the highlighting panel, will fail.

      Symptoms:
      The following appears in atlassian-confluence.log:

      java.net.SocketTimeoutException: Read timed out
      	at java.net.SocketInputStream.socketRead0(Native Method)
      	at java.net.SocketInputStream.read(SocketInputStream.java:152)
      	at java.net.SocketInputStream.read(SocketInputStream.java:122)
      	at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
      	at sun.security.ssl.InputRecord.read(InputRecord.java:480)
      	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
      	at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
      	at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
      	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
      	at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
      	at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
      	at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
      	at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
      	at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
      	at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
      	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
      	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
      	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
      	at com.atlassian.confluence.util.http.httpclient.HttpClientHttpRetrievalService.get(HttpClientHttpRetrievalService.java:65)

      Steps to Reproduce:

      1. Start up JIRA from source in debug mode.
      2. Start up Confluence, and create an application link between the two instances
      3. Set the Socket Timeout in General Configuration to, for example, 20000 (20 seconds)
      4. Create a project and issue in JIRA
      5. Set a breakpoint in JIRA anywhere that's convenient and hit the breakpoint
      6. Create a new page in Confluence and open up the network tab of your Browser
      7. Create a JIRA Issues Macro in Confluence and search for the new project. This will timeout

      Expected Results
      The macro times out after 20 seconds, as specified in Confluence's Socket Timeout.

      Actual Results
      The macro times out after 10 seconds, the default set in com.atlassian.sal.core.net.SystemPropertiesConnectionConfig

      Workaround:

      Add the following to your system properties in bin/setenv.sh:

      CATALINA_OPTS="$CATALINA_OPTS -Dhttp.socketTimeout=<YOUR_NEW_TIMEOUT_IN_MILLISECONDS>"
      CATALINA_OPTS="$CATALINA_OPTS -Dhttp.connection.timeout=<YOUR_NEW_TIMEOUT_IN_MILLISECONDS>"

      For more information please see Configuring System Properties.

      Attachments

        Issue Links

          Activity

            People

              kmacleod Kenny MacLeod
              ldally lachland
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: