Monitoring the batch processing heartbeat

When a batch processor runtime instance starts, it also starts a heartbeat thread for the current job.

The heartbeat thread updates the statistics for the current batch job at a predefined interval, enabling you to monitor that the batch job is working as expected and is, in effect, 'alive'.

The default value of the heartbeat interval is 60 seconds. The interval value is defined in the Batch.properties file:

## The default job progress refresh time (in seconds)
progressStatus.refreshTime = 60

At every interval, the heartbeat thread also checks for a stop signal sent from a user through an InfoSphere® MDM updateTask transaction (by updating the batch job status to Stopping). If the heartbeat thread detects a Stop signal, then it issues a shutdown command to the batch processor instance.

There may be a delay between the time a user sends the stop signal and the time the heartbeat detects the change and issues the shutdown command. The maximum time of this delay is equal to the interval time.

If you wish to see more frequent heartbeat updates, you can set the refresh interval to a shorter period, such as 10 seconds (progressStatus.refreshTime = 10). However, because the statistics messages will be updated more frequently, the activity logs (Activity.log) and Alert History table will grow quickly.

Tip: If you set the refresh interval to a shorter period, you can disable your Alert History table to prevent it from growing too large too quickly.