1 Reply Latest reply: May 20, 2014 1:06 PM by Venkat.Nagi-Oracle RSS

    Request timeout for distributed cache client

    68d63f5d-c900-4848-b8bd-833636596792

      This is a repost/re-ask of Set request timeout for distributed cache

       

      We have webapps which serve as distributed scheme cache clients for our main cluster(version 3.5.3). Searching the docs, the -Dtangosol.coherence.distributed.request.timeout=<timout>ms will serve as the flag to timeout long-running requests from the webapp to the distributed cluster.  Testing this locally, I find a very useful exception of com.tangosol.net.RequestTimeoutException: Request timed out after <timout> millis.  However, I have been unable to configure this timeout via the <cluster-config> mechanism.

       

      Here's an example of the tangosol-coherence-override.xml we use currently

       

      <!DOCTYPE coherence PUBLIC "-//Oracle, Inc.//DTD Oracle Coherence 3.4//EN"

              "http://www.tangosol.com/dtd/coherence_3_4.dtd">

      <coherence>

          <cluster-config>

              <unicast-listener>

                  <well-known-addresses>

                      <socket-address id="1">

                          <!-- shared grid well known host   -->

                          <!-- QA-1 -->

                          <address>10.190.20.23</address>

                          <port>8088</port>

                      </socket-address>

                      <socket-address id="2">

                          <!-- shared grid well known host   -->

                          <!-- QA-1 -->

                          <address>10.190.20.90</address>

                          <port>8088</port>

                      </socket-address>

                  </well-known-addresses>

              </unicast-listener>

          </cluster-config>

          <configurable-cache-factory-config>

              <class-name>our-mutlifile-class-factory</class-name>

          </configurable-cache-factory-config>

      </coherence>

       

      I've tried to configure the above setting using the following mechanism

      <services>

                 <service-type>StyleCache</service-type>

                  <service-component>DistributedCache</service-component>

                  <init-params>

                      <init-param>

                          <param-name>request-timeout</param-name>

                          <param-value>1</param-value>

                      </init-param>

                  </init-params>

      </services>

       

      I've also tried to configure this via the <service-guardian> mechanism, but I'd rather not have the applications disconnect from the cluster for one slow request.

       

      Is there another way to specify the tangosol.coherence.distributed.request.timeout without updating the configuration of the cluster nodes?

       

      Thanks,

        • 1. Re: Request timeout for distributed cache client
          Venkat.Nagi-Oracle

          You have to define the time in appropriate format like below

           

          <services>

                     <service-type>StyleCache</service-type>

                      <service-component>DistributedCache</service-component>

                      <init-params>

                          <init-param>

                              <param-name>request-timeout</param-name>

                              <param-value>1s</param-value>

                          </init-param>

                      </init-params>

          </services>

           

          From docs:

           

          request-timeout

          Specifies the maximum amount of time a client waits for a response before abandoning the original request. The request time is measured on the client side as the time elapsed from the moment a request is sent for execution to the corresponding server node(s) and includes the following:

          • the time it takes to deliver the request to an executing node (server)
          • the interval between the time the task is received and placed into a service queue until the execution starts
          • the task execution time
          • the time it takes to deliver a result back to the client
          The value of this element must be in the following format: [\d]+[[.][\d]+]?[MS|ms|S|s|M|m|H|h|D|d]? where the first non-digits (from left to right) indicate the unit of time duration:
          • MS or ms (milliseconds)
          • S or s (seconds)
          • M or m (minutes)
          • H or h (hours)
          • D or d (days)

          If the value does not contain a unit, a unit of milliseconds is assumed. Legal values are positive integers or zero (indicating no default timeout). The default value is an infinite timeout (0s) for clustered client requests and 30 seconds (30s) for extend client requests.