Understanding Q-Assign Safe Mode


Safe Mode is a safety net for Q-assign. It helps to ensure that Q-assign runs at optimal speed even when it hits Salesforce limits. Let's take a closer look at what Safe Mode is and why your org may need to use it.


What is Safe Mode?

Safe Mode is a feature designed to keep Q-assign running at peak performance while staying within Salesforce limits. When Q-assign encounters an unexpected issue during its run, it will automatically enter Safe Mode. In this mode, a reduced number of records are processed per each Q-assign scheduler run, so that Salesforce Governor limits are not hit. 


Why does an org go into Safe mode?

The cause of Q-assign going into Safe Mode is almost always due to a change in data or some process (including triggers, workflows, flows, validation rules, etc.) outside of Q-assign being triggered by the Q-assign assignments and hitting the Salesforce Governor Limits. 


Some common errors associated with Salesforce Governor Limits include: 

[QUERY_TIMEOUT] Your query request was running for too long: This Salesforce timeout indicates that the Salesforce server is cancelling the query because it is taking too long to process.

Too many SOQL queries: 201: This error occurs when SOQL queries governor limits are exceeded.

Too many DML rows: 10001: This error is due to the DML limit of 10000 DML statements. It means you have processed more than 10000 records from DML statements.

While any outside change can't be curbed, Q-assign does monitor and control it's own use of Salesforce resources like, CPU, DML, SOQL etc. and it quits processing where it senses it is close to any of those limits. It starts the processing from the exact point where it left-off and completes the processing in the subsequent runs. This can be seen in the Last Run Report in Q-assign Control Panel, 


How many records will be processed in Safe mode?

Going into Safe Mode does not necessarily mean that Q-assign won't assign records but only means that it will assign records depending on 'Next Job Number Records to Process' which is the number of records that are going to be processed in the next run. This can be check from Q-assign Control Panel. In the below screenshot only 1 record will be processed during a run: 


Can Q-assign come out of Safe Mode automatically?

From Q-assign v4.831 onwards, we have introduced an enhancement which allows Q-assign to come out of Safe Mode automatically if Q-assign is able to run 10 consecutive successful jobs after encountering an issue. This onsecutive successful jobs threshold value of 10 can be changed by adding a setting record under Q-assign Customer Settings Custom Metadata Type record.


It is always good practice to get in touch whenever Q-assign goes into Safe mode. Our support team can help investigate the root cause.


Please contact us at support@ortooapps.com for any questions.

Was this information helpful?