Solved

Does background jobs with queue_id=4 get prioritized?


Userlevel 6
Badge +14

Hi all,

I have noticed that if I run a background job with queue_id=4 (Touch apps push), it with execute within a few seconds.

I have now created a new queue (9) with the same parameters as 4 and it always execute much slower.

 

Can anyone explain why and what to do about it (20 sec is sometimes too slow)?

icon

Best answer by kathlk 4 January 2021, 11:47

View original

This topic has been closed for comments

10 replies

Userlevel 6
Badge +14

Search for “Database Processes” in EE and open the screen. You will see one row per each batch queue. First compare  values for Database Process Queue 4 and 9  (Job Action looks like ‘Transaction_SYS.Process_All_Pending__(<Queue Id>,'<Queue Name>','%',job_id_)’).

Re inti batch Queue can be done via a RMB option in the batch queue screen.

Userlevel 6
Badge +14

Hi Hans;

Start time of a BG job is depends on how many other pending jobs are queued in the same Batch Queue. Even batch queue configuration is the same, no of BG jobs in the queue might be not the same (may be you can verify that) ?  If you do not have any Touch Apps installed on this environment, then there is no load on Queue 4. it fetch your jobs quick.  may be you can compare it. 


Thanks

Kapila 

Userlevel 6
Badge +14

Yes, the execution plan is different

 

 

Userlevel 6
Badge +14

‘Init batch queue’ did the job.  

Thanks a lot.

Userlevel 6
Badge +14

I am on a test environment. There is nothing in either queue 4 or 9 when jobs are posted. They jobs are running the same procedure. Still, there is a considerable difference.

Transaction_Sys.Deferred_Call(
procedure_name_ => 'INDUFLEX_ESTIMATE_API.Set_Transfer_Part_No',
argument_type_db_ => 'PARAMETER',
arguments_ => attr_,
description_ => 'hja',
queue_id_ => 9
);

Transaction_Sys.Deferred_Call(
procedure_name_ => 'INDUFLEX_ESTIMATE_API.Set_Transfer_Part_No',
argument_type_db_ => 'PARAMETER',
arguments_ => attr_,
description_ => 'hja',
queue_id_ => 4
);

 

Userlevel 6
Badge +14

Can you check the Database Process relevant to each queue. Before doing you can re init both batch queues at the same time. Then the values in database process will start from 0. I would like to see the Priority, Runs  and Execution Interval columns where you can match values in queues.  

Userlevel 6
Badge +14

May be check the values before In it batch Queue. I would expect two different Execution Intervals there in the Db Process. 

Userlevel 6
Badge +14

Hi @kathlk 

Can you further explain how todo these?

check the Database Process relevant to each queue

 

 re init both batch queues

 

 

Userlevel 6
Badge +14

Good job :grinning:

Userlevel 7
Badge +18

I've run into a strange issue a couple times that is somewhat related, and the solution might be worth sharing here...

After killing a blocking session, initializing the batch queue failed:

"One or more batch jobs are currently running. If you still need to initialize the queue, first break the running jobs from Database Processes windows and retry"

At the Oracle level, the job was in a weird state. It couldn't be disabled because it looked like it was running, but it couldn't be stopped because it looked like it was disabled. (If this wasn't production, I would have loved to restart the server to get back to a clean slate.)

The solution looked something like this:

BEGIN
   dbms_scheduler.enable('F1JOB_128');
   dbms_scheduler.stop_job('F1JOB_128');
   dbms_scheduler.disable('F1JOB_128');
END;
/

(We ran into this a few times on 11.2.0.3, and now that I think of it, I can’t remember seeing it since we upgraded to 12.1.0.2.)