Friday, May 19, 2017

Cluster down when leasing DB is restarted

if you get often a message
<BEA-310006> <Critical subsystem JTAMigratableGroup has failed. Setting server state to FAILED. Reason: JTA migratable target lost a lease>
you might consider tuning these 2 parameters in confix.xml:
database-leasing-basis-connection-retry-count
"The maximum number of times Database Leasing will try to obtain a valid connection from the Data Source. (Interface=weblogic.management.configuration.ClusterMBean Attribute=getDatabaseLeasingBasisConnectionRetryCount)"

Default 1

database-leasing-basis-connection-retry-delay
The length of time, in milliseconds,Database Leasing will wait before attempting to obtain a new connection from the Data Source when a connection has failed. (Interface=weblogic.management.configuration.ClusterMBean Attribute=getDatabaseLeasingBasisConnectionRetryDelay)

Default 1000 (millis)



Saturday, May 6, 2017

Poll result: who finances ISIS?



Friday, April 28, 2017

WebLogic EJB call timeout

If you get often this type of stuck threads:

"[STUCK] ExecuteThread: '170' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=10 tid=0x00002b4f841f1b20 nid=0x5763 in Object.wait() [0x00002b4f8c842000]
   java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0x0000000776826778> (a weblogic.rjvm.ResponseImpl)
 at weblogic.rjvm.ResponseImpl.waitForData(ResponseImpl.java:90)
 - locked <0x0000000776826778> (a weblogic.rjvm.ResponseImpl)
 at weblogic.rjvm.ResponseImpl.getTxContext(ResponseImpl.java:130)
 at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:110)
 at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:222)


you might want to set these 2 parameters (this for WLS 10.3.6 )
-Dweblogic.rmi.clientTimeout=valueInMilliseconds
weblogic.jndi.requestTimeout=valueInMilliseconds

The reason of that WAITING is that there is a synchronized block followed by an Object.wait(timeout):

  private void waitForData()
  {
    int i = 0;
    synchronized (this)
    {
      long l1 = this.timeout;
      while (!isAvailable()) {
        try
        {
          int j = 0;
          long l2 = System.currentTimeMillis();
          wait(l1);
          if (this.timeout > 0)
          {
            long l3 = System.currentTimeMillis() - l2;
            if (l3 >= l1) {
              j = 1;
            } else {
              l1 -= l3;
            }
          }
          if ((!isAvailable()) && (j != 0))
          {
            this.t = new RequestTimeoutException("RJVM response from '" + this.rjvm + "' for '" + (this.md != null ? this.md.toString() : "null") + "' timed out after: " + this.timeout + "ms.");
            
            i = 1;
          }
        }
        catch (InterruptedException localInterruptedException) {}
      }
    }
    if (i != 0) {
      this.rjvm.removePendingResponse(this.id);
    }
  }

See also:
Oracle Support doc "JNDI Thread Stuck" (Doc ID 1482310.1)
For alternative ways to specify timeouts in WLS 12 , see https://docs.oracle.com/middleware/1212/wls/WLRMI/rmi_api.htm#WLRMI251
In WLS 10, https://docs.oracle.com/cd/E11035_01/wls100/ejb/DDreference-ejb-jar.html#wp1362824 use remote-client-timeout in your weblogic.ejb-jar.xml