Skip to main content

We would like to be notified if background jobs are running long or longer than normal for the job. Does anyone have a solution or suggestion to help with that? It would also be ideal to see if the wait times in a job queue are high. We don't get notified until a user complains and then it’s become an issue. Please let me know.

@CRUNDELL  You can add the event action on the logical unit “DeferredJob” for the table “TRANSACTION_SYS_LOCAL_TAB”. 

Here you can check when the column STATE is changed then you can fire an action to send an email.

 


Hi,

But how can even action know this background job work longer than usual time ?

@SNBSHAN 

Thanx.

 


@nafismertapaydin 

Yes true this event action will not help in this case.

Please see if the below suggestion can work for you.

 

Step 1 Create an event action for DeferredJob LU

This action will check if the background job has been running for an hour. You can look at the query based on your requirements.

 

Step 2 Call the above event action

You can schedule this based on your requirements. For example, every hour or half an hour to check if the jobs are running more than an hour.

Hope this can help you.


If I was in your situation, a possible solution that you could implement would be a multi-step approach involving custom events and event actions plus a reference table that you need to create in your system:

  1. Observe the pain-points (the events that normally create issues in your system). Use the TRANSACTION_SYS_LOCAL_TAB to measure how long those jobs take to complete. Make sure those jobs do not get purged too soon as leave enough of these jobs once they have completed (STATE = “Ready”) to do a thorough analysis. Some questions you want answers for: What is the AVG execution? is the execution constant or does it fluctuate wildly during the day? what is the threshold value that you are willing to accept before alerting (sending an email)?
  2. Armed with that knowledge, create a supporting table that at least holds one row for each job category and threshold value. You could do things a bit more sophisticated if you feel like it like having a threshold “day” value and a “nightly” one (e.g. Background Job XYZ should not take more than 20 seconds during business hours but it can take up to a minute during the maintenance window, only alert if 3 jobs consecutively break that threshold, etc.)
  3. Create a JOB that runs, let’s say, every 10 minutes (you can choose how often you like to check) that joins your TRANSACTION_SYS_LOCAL_TAB table with the table you created containing the events and thresholds (e.g. BACKGROUND_JOB_ALERT) and alert when the execution time exceeds your threshold. You can get the execution time by doing something like (SYSDATE - STARTED) * 86400

I know this still requires the implementation, but following these guidelines and knowing your PL/SQL, you should have all you need to create your custom solution.

 

Good luck!


Are you talking about the IFS Cloud. Don’t know on the development side, your developer can help you on that.

You can Create an Application Monitoring Lobby for Background Job with different conditions, we are using a Lobby for Background job with following conditions:

BG Executing Count

BG Posted Count

BG in Executing Status From 1 HR or More

BG in Posted Status From 30 Min or More

BG Jobs in Error Count for Past 12 hours
 

 


Reply