Salesforce API Limits: Connection to CRM Server Failed: REQUEST_LIMIT_EXCEEDED

  • Updated

Salesforce imposes an API Call limit for all of their customers. This is done to ensure equitable access to the hosted service for all subscribers. Salesforce Organizations are subject to a maximum number of API calls that can be made against Salesforce servers in any 24-hour period. When Riva performs a full sync, it polls Salesforce for items that need to be synced and then performs the sync of those data items. Both the polling activity and the data sync activity consume a number of API calls (usually between 6 to 10 calls per sync cycle per user). The number of calls per sync varies depending on the amount of data that needs to be synced. For an example, see Calculating daily Salesforce API call consumption by Riva.

 

Limits are enforced against the aggregate of all API calls made by the organization in a 24-hour period; limits are not on a per-user basis. When an organization exceeds a limit, all users in the organization may be temporarily blocked from making additional calls. Calls will be blocked until usage for the preceding 24 hours drops below the limit.

Contents:

API Limit Background

To ensure service levels and quality, Salesforce (SFDC) restricts the number of API calls made to their services.

Each edition of Salesforce has its own limit per user for the number of allowed API calls for every 24-hour period.

  • Example: If your organization is using {specific edition} and has 50 users, SFDC allows the organization to make 50*{specific edition} API calls per 24-hour period. When an organization exceeds a limit, applications that access the APIs are temporarily blocked from connecting to Salesforce. This does not have an impact on users accessing Salesforce in their browser.

To review the API limits in place for each edition, see Salesforce API Request Limits.

Deployment Considerations

Riva implements as many SFDC recommendations as possible to minimize the number of API calls made. However, as Riva is a synchronization engine, the number of API calls expected to be used can be high, depending on the sync policy configuration. During each synchronization poll, a number of API calls are made. At a minimum, there are two API calls per enabled module per poll — this applies to null sync polls, where no data is synced from the CRM to the Email system.

  • Example: For a single user with a 10-minute peak poll interval, the peak being from 8:00 AM to 4:00 PM for a total of 8 hours (480 minutes), a total of 48 synchronizations would occur. At a minimum of 2 or 3 API calls per module, including contacts, tasks, events, and emails, there is a total of 6 to 9 API calls per sync. The synchronization of this user would use from 288 to 432 API calls during peak hours — well below most API call limits.

The number of calls is defined and controlled by the synchronization policy within Riva.

When changes are detected during a regular polling cycle, by default, up to 500 changes are retrieved at once. This upper limit is configurable for up to a maximum of 2,000 changes. If more changes than the limit are detected, additional API calls will be required to retrieve the remaining changes.

By understanding the way API calls are limited by SFDC, a combination of different policies can be created to provide the level of synchronization needed.

The API limitation may create a problem during the first initialization if a large number of contacts, calendar events, opportunities, etc. are being synchronized. It is important not to enable ALL users at once if a large number of items are being synced in order not to run out of API calls. If you do exceed your API daily limit, Riva resumes where it was before the limit was reached.

Best practice during your testing: Enable a single user and monitor the API usage. Using the number of API calls made by that user as an API count base, you can calculate how many users you can enable at once. The number of API requests made during the initialization depends on the number of modules that were enabled and the number of items in each module that are being synced from Salesforce to Exchange.

When you have your policy synchronizing daily, the number of API calls will be significantly fewer than during the initial synchronization.

Note: If multiple applications make use of the SFDC WebService / APEX API, the API count usage is not per application, but organization-wide. In some situations, it may be desirable to purchase additional SFDC accounts to increase the daily API limit to a level needed for your services.

Viewing API Calls Consumption in Salesforce

Salesforce provides admin users with two ways to view API Calls consumption metrics. Log in to Salesforce as the Riva connection user to view the following metrics:

To view the "API Requests, Last 24 Hours" report (Salesforce Lightning or Classic):

  1. Select Setup.

  2. In the Quick Find box, search for Company.

  3. Select Company Information.

  4. View the figures in the API Requests, Last 24 Hours field.

    Note: The value being tracked in that field shows what has been consumed within the last 24 hours. Any calls consumed will continue to be counted towards this count until that time the next day.

To view the "API Usage Last 7 Days" report (Salesforce Classic only):

  1. Open the Reports tab.

  2. Select the Administrative Reports folder.

  3. Select the API Usage Last 7 Days report.

    Note: This report displays the call count associated with each day the individual call is consumed.

For more information on how to interpret the API calls usage data, see Why don't the numbers for my API usage align with the numbers in my "API Usage Last 7 Days" report?

Solution and Best Practices

The following strategies help reduce the number of API calls made:

If you receive a REQUEST_LIMIT_EXCEEDED or "Total Requests Limit exceeded" error,

  1. Stop the Riva CRM Service, and wait 4 to 8 hours for the number of API's used to go back down.

  2. Edit the sync policy to reduce the number of API calls consumed.

  3. Start the Riva CRM Service. Continue to monitor the API count in SFDC.

Another possible solution

Riva can be configured to assign a higher value for the Riva query retrieve limit per API call.

Was this article helpful?

/

Comments

0 comments

Article is closed for comments.