Maximum number of transactions

bonsai
Mega Sage

※Paris version

 

When I checked the transactions when I executed the following script, I could only execute up to 8 transactions at a time.

function scripte() {
    //ScheduleJob

    sleepe(12000);

    function sleepe(a) {
        var startMsec = new Date();
        while (new Date() - startMsec < a);
    }
}
var sched = new ScheduleOnce();
sched.script = '(' + scripte + ')();';
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();
sched.schedule();

 

find_real_file.png

 

Originally I want 12 transactions to be launched.
Can this be adjusted from 8 to 12?

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, as Appli indicated a node has 8 configured 'workers' and it will also have a 'burst worker' which may activate under specific conditions to handle core functionality.

https://community.servicenow.com/community?id=community_article&sys_id=e61d22e5dbd0dbc01dcaf3231f9619fd

Can you clarify your business requirement\intended objectives?
Why do you require 12 concurrent transactions?

 

 

View solution in original post

9 REPLIES 9

Appli
Mega Sage
Mega Sage

Hi, I believe the max number of workers (8) per node  is hardcoded in background scheduler and could not be changed. But please raise a support case for ServiceNow asking them to confirm the same.

Hope it helps

Hope it helps

thank you for your answer. Is per node a unit to be executed by one script? Is it possible to execute 8 or more transactions by calling this script recursively?

Tony Chatfield1
Kilo Patron

Hi, as Appli indicated a node has 8 configured 'workers' and it will also have a 'burst worker' which may activate under specific conditions to handle core functionality.

https://community.servicenow.com/community?id=community_article&sys_id=e61d22e5dbd0dbc01dcaf3231f9619fd

Can you clarify your business requirement\intended objectives?
Why do you require 12 concurrent transactions?

 

 

The following is an example of an "incident" table, but I want to execute transactions for the number of records in a specific table at the same time.

 

function scripte() {
    //ScheduleJob

    sleepe(12000);

    function sleepe(a) {
        var startMsec = new Date();
        while (new Date() - startMsec < a);
    }
}
var sched = new ScheduleOnce();
sched.script = '(' + scripte + ')();';

var grInc = new GlideRecord('incident');
grInc.query();
while (grInc.next()) {
	sched.schedule();
}

 

I'd like to know more about'burst worker', but the following text on the page you told me adjusts the property numbers. Which table record does this adjust?
I heard that the "priority" field is missing in the "sys_trigger" table.

 

Configure scheduled jobs to use 'burst' scheduler workers

For instances running Dublin or newer releases, you can insulate against "clogged up" scheduler worker queues by setting the 'priority' field on the sys_trigger entry for the scheduled job to be "25". By making this change, you can ensure that core jobs such as event processors, SMTP sender, POP reader and SMS sender get triggered in a timely fashion. Should all the scheduler workers be busy with other jobs, an "important" job which is more than 60 seconds past due will spawn a 'burst scheduler worker' and execute in parallel to the core 8 schedulers on the node. This is taken care of Out Of Box from the Geneva release and onwards. Caution: This is good insulation, but should not be used as an excuse not to address the root causes of the other "long running" or "high volume" scheduled jobs.