Docs

Log in to read the version of docs relevant to your site, or use the dropdown versions

Multiple Query Rows in Chargebee Integration - APEX Errors - Salesforce

Summary

In some instances, you might hit the governor limit in your Salesforce account and encounter multiple APEX errors.

Please ensure you are using the latest Salesforce package version. You can check the latest version details in our 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 such cases, verify if the Salesforce user who originally initiated the sync is still active. If the user has become inactive, the sync will fail and lead to query limit issues.

Fix:

To reset the job user and trigger a fresh sync:

  1. Navigate to Chargebee Settings in your Salesforce account.
  2. Update the sync frequency temporarily:
    • Change from Daily to Weekly, then click Proceed.
    • Revert back to Daily and click Proceed again.

This will reassign the sync job to the current active user and resolve the query row limit issues.

Additional Help

If you're still facing this error after implementing the above steps, contact support@chargebee.com. Our Solutions Engineers will assist you further.

Was this article helpful?