Tuesday, September 3, 2013

Server failed to get a connection to the database in the past 30 seconds for lease renewal. Server will shut itself down.

If you are using a database to manage leasing information , the server renews its "lease" by updating the timestamp in the lease table.

If a migratable server fails to reach the lease table and renew its lease before    the lease expires, it terminates as quickly as possible using a Java System.exit command and you can see a error trace as below:

<Sep 3, 2013 8:22:30 AM GST> <Warning> <Cluster> <BEA-000147> <Server "wls_soa2" failed to renew lease in the database.> 
<Sep 3, 2013 8:22:30 AM GST> <Error> <Cluster> <BEA-000150> <Server failed to get a connection to the database in the past 30 seconds for lease renewal. Server will shut itself down.> 
<Sep 3, 2013 8:22:30 AM GST> <Critical> <Health> <BEA-310006> <Critical Subsystem ServerMigration has failed. Setting server state to FAILED. 
Reason: Serverwls_soa2 failed to renew lease in the database> 
<Sep 3, 2013 8:22:30 AM GST> <Critical> <WebLogicServer> <BEA-000385> <Server health failed. Reason: health of critical service 'ServerMigration' failed> 
<Sep 3, 2013 8:22:30 AM GST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED> 
<Sep 3, 2013 8:22:30 AM GST> <Error> <> <BEA-000000>


To resolve  this issue please ensure that same time is set on all backend RAC database  nodes to which leasing datasource is connecting to.

This can also happen due to slow database connections and the timeout can be modified using the below properties.


By default a migratable server renews its lease every 30,000 milliseconds—the
product of two configurable ServerMBean properties:
– HealthCheckIntervalMillis, which by default is 10,000.
– HealthCheckPeriodsUntilFencing, which by default is 3.

Consensus leasing can be a option since it doesn't have the database dependency.

No comments:

Post a Comment