Introducing the Chargebee CLI

Too many query rows in the Chargebee Salesforce integration

Summary

In some cases, you may hit the Salesforce governor limit and encounter multiple APEX errors.

Make sure you are using the latest Salesforce package version. You can review the latest version details on the Release Notes page by selecting the CRM Salesforce tag in the right pane.

Sample log

Failed to process Queueable job for class chargebeeapps.QueueableJobForSiteMaster for job ID XXXXXXXXXXXX
caused by: System.LimitException: chargebeeapps:Too many query rows: 50001
Class.chargebeeapps.MetadataServiceUtil.helperContent: line 22, column 1
Class.chargebeeapps.MetadataServiceUtil.updateStaticResource: line 38, column 1
Class.chargebeeapps.MerchantSettings.getChargebeeSettings: line 160, column 1
Class.chargebeeapps.MerchantSettings.upsertChargebeeSettings: line 175, column 1
Class.chargebeeapps.MerchantSettings.merchantSettingsApiCall: line 26, column 1
Class.chargebeeapps.QueueableJobForSiteMaster.execute: line 93, column 1

Root cause and solution

In this case, check whether the Salesforce user who originally initiated the sync is still active. If the user has become inactive, the sync can fail and trigger query row limit issues.

Fix

To reset the job user and trigger a fresh sync:

  1. In Salesforce, go to Chargebee Settings > Sync Health > Sync Settings.
  2. Temporarily update the sync frequency:
    • Change it from Daily to Weekly, then click Proceed.
    • Change it back to Daily and click Proceed again.

This reassigns the sync job to the current active user and resolves the query row limit issues.

Additional help

If you continue to face this error after following the steps above, contact support. Our Solutions Engineers will assist you further.