Wednesday, August 31, 2011

Unicast cluster tuning

there are 2 properties you can set:

weblogic.cluster.unicastHeartbeatTimeoutMillis (default 15000)
weblogic.cluster.unicastDiscoveryPeriodMillis (default 3000)

If you get a message like:
add Leader BLA to unreliableSet

(you get it only if UnicastMessaging debug flag is enabled)


and your cluster is divided in multiple groups each one with its own Group Leader, and this is annoying you,
you MIGHT consider changing the timeout value (do it at your own risk, side effects are still unknown by the author of this blog!).

In fact unicastHeartbeatTimeoutMillis determines how long after the last heartbeat (LAT=Last Arrival Time) the "slave" should declare that the Group Leader is unrealiable.


The cluster's GroupLeader sends heartbeat messages every LeaderHeartbeatPeriod seconds:

http://download.oracle.com/docs/cd/E11035_01/wls100/schemaref/security/http.www.bea.com.ns.weblogic.920.domain/types/database-less-leasing-basistype.leader-heartbeat-period.html

default value 10.


to view the value of the heartbeat period:



wlst.sh

connect('weblogic', 'welcome1', 't3://localhost:7011')
cd(‘/Clusters/myCluster/DatabaseLessLeasingBasis/myCluster’)
cmo.getLeaderHeartbeatPeriod()


and it’s 10



and to set it I tried:

cmo.setLeaderHeartbeatPeriod(20)

but I get

java.lang.RuntimeException: The requested attribute is not exposed through JMX: setLeaderHeartbeatPeriod

Caused by: javax.management.AttributeNotFoundException: Attribute is readonly. : com.bea:Name=myCluster,Type=DatabaseLessLeasingBasis,Cluster=myCluster:LeaderHeartbeatPeriod

So I guess you can only set it by hacking the the config.xml – I don’t see it in the WebLogic console.

No comments: