Understanding the Safe Mode

What is Safe Mode?

Safe Mode is a safety net for Q-assign. It is designed for the purpose of keeping Q-assign running at optimal speed even if it’s hitting any Salesforce limits during its run. It allows Q-assign to maximize its performance while staying within the limits.

Why does an org go into Safe mode?

An org goes into Safe mode whenever Q-assign hits an unexpected issue when running scheduled Assignment Groups. The cause is almost always due to hitting Salesforce Governor Limits, which can be due to a change in data or some process outside of Q-assign being triggered by the Q-assign assignments. During Safe Mode, a reduced number of records are processed per each Q-assign scheduler run, such that Salesforce Governor limits are not hit. Assignments will continue but maybe at a slower rate. The number of records that are processed will gradually and automatically be increased to the 'Max records per job' as well, as Q-assign will continue to work within Safe Mode.

Q-assign has a built-in safety check which monitors the usage of the Salesforce resources like, CPU, DML, etc. and it quits the 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. It is visible in the Last Run Report when Q-assign quits due to being close to Salesforce Governor limits. So, if there is a huge number of records to be processed, Q-assign – within the limits – will try to assign the maximum number of the records and will try to assign the remaining ones in the next run/s.


The most frequent errors due to which an org goes into Safe mode are mentioned below:


  • Error: [QUERY_TIMEOUT] Your query request was running for too long.
    This is a Salesforce timeout and may indicate that the salesforce server is cancelling your query because it is taking too long to process
  • Error: Too many SOQL queries: 101
    The errors of the above type occur when SOQL queries governor limits are exceeded. 
  • Error: Too many DML rows: 10001
    This error is due to the DML limit of 10000 DML statements. It means you are processing more than 10000 records from DML statements.


Most often the reason for Q-assign to go into Safe mode is due to some processes outside of Q-assign (triggers, workflow rules, validation rules, etc.) being triggered by Q-assign. Just to reiterate, 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'. This tells us about the number of records that are going to be processed in the next run e.g. in the below screenshot only 1 record will be processed during a run: 


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?