Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-46301

Http timeouts for OpenSocial gadgets still not configurable

    Details

    • Type: Feature Request
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 6.2.1 CE GA2
    • Fix Version/s: None
    • Component/s: Open Social
    • Labels:
      None

      Description

      Affected version: released 6.2CE GA2 (no option in dropdown)

      This probably needs to be split into at least 2 separate bugs. OpenSocial gadgets should be configurable for load time and the http request time without editing source code.

      We have this property in portal-ext.properties:

      com.liferay.portal.util.HttpImpl.timeout=40000

      And these settings and comments in portlet-ext.properties:

      1. fix gadget load and initialisation time
        pubsub.uri.load.timeout=300000
      2. the above line doesn't work, we need to edit:
      3. liferay/tomcat/webapps/opensocial-portlet/gadget/js/main.js:181
      4. to hardcode an entry, e.g.,
      5. timeout: 300000, /instance.get('pubsubURILoadTimeout'),/
      1. fix makeRequest response time
      2. NOTE: THESE STILL HAVE TO BE CHANGED IN:
      3. webapps/opensocial-portlet/WEB-INF/classes/shindig.properties
      4. NOTE: ALSO LOOK IN:
      5. webapps/opensocial-portlet/WEB-INF/src/portlet.properties

      shindig.http.client.connection-timeout-ms=300000
      shindig.http.client.read-timeout-ms=300000

      With these settings in our properties files, after a clean install and no other changes, I get:

      Apr 27, 2014 3:04:50 AM org.apache.shindig.gadgets.http.BasicHttpFetcher fetch
      INFO: Timeout for http://vmr-dev.uni-muenster.de/community/vmr/api/statistics/pages/ Exception: java.net.SocketTimeoutException - Read timed out - 5006ms

      This relates to both:
      1) loading a gadget itself: if a page has 5 gadgets and the user is on a slow connection, the outer page loads first, then requests all 5 gadgets to load and the gadgets which don't load within the 5 seconds default time will give up.

      2) gadgets.io.makeRequest, as seen in the above warning. If a longer query (e.g., complex report generation) to a service is made via makeRequest, if the service does not respond within the default 5 second timeout, the request gives up, irrespective of the property settings which attempt to raise this timeout.

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            scribe Troy A. Griffitts
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package