BWENGINE failed to get next job ID block.

BWENGINE failed to get next job ID block.

book

Article ID: KB0094039

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:

Each BW engine gets a unique block of 1000 numbers (default) when it starts up. As jobs are created, the engine assigns a job ID from this block. After 1000 jobs are created, the engine goes back and fetches the next unique block of 1000 numbers. To ensure that the block is unique across all BW engines, BW uses a locking mechanism. An engine attempting to get it will wait and retry until they timeout. While using the file based datamanager db/internal/nextJobidBlock.lock is shared across both engines. Similarly, for a DB based datamanger, the "Internal" table should have the nextJobidBlock.


Symptoms:
Error [BW-Core] BWENGINE-100025 Failed to get next job id block.

java.io.FileNotFoundException: /opt/tibco/product/tra/domain/.../internal/nextJobidBlock (No such file or directory)

Cause:
If one engine is holding this lock, other engines attempting to get it will wait and retry until they timeout. Normally, the operation of getting a block of numbers is very quick so 20 seconds (default timeout) is more than enough. 

Issue/Introduction

BWENGINE failed to get next job ID block.

Resolution

The workaround is to increase the Engine.JobIdBlockSize parameter in your deployed .tra file from default of 1000 to something like 5000. Make sure that you restart your engine (not redeploy) after you set the property. 


Example:  Engine.JobIdBlockSize=5000


By increasing this value, you are minimizing the chances of the DB being accessed simultaneously. To make the property editable via the admin GUI for different deployments, it has to be added to the bwengine.xml file at the location <install_dir>\TIBCO\bw\5.x\lib\com\tibco\deployment, before creating the EAR as shown below:

**

<property>

       <name>JobId block size</name>

       <option>Engine.JobIdBlockSize</option>

       <default>1000</default>

       <description>On startup the  reads a job id block size from the DataManager. Each newly created job is assigned a id from this block. By default the value is1000</description>

    </property>

***