API Calls exceeded during sp_replicateall

I kicked of an SF_replicateAll and left it running, I came back to this error message and now DBAmp is unable to connect as the API calls have been exceeded.

I think I understand whats happened, and that the lockout will sort itself out in time, my question is really for advice. Whats the best practice when refreshing/replicating from sfdc to avoid this problem in future? Thanks,.

0:47:47: Drop LeadFeed_Previous if it exists.
00:47:47: Create LeadFeed_Previous with new structure.
00:47:49: Run the DBAmp.exe program.
00:47:49: DBAmp Bulk Operations. V2.13.6 (c) Copyright 2006-2011 forceAmp.com LLC
00:47:49: Replicating into LeadFeed_Previous , LONTER03 / Salesforce_backups_live .
00:47:50: DBAmp is using the SQL Native Client.
00:47:50: Opening SQL Server rowset

02:13:23: Error: An error has occurred while fetching rows from salesforce.com.
02:13:23: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.
02:13:23: Error: Replication failed.
Source: SForceOfficeToolkit4.SQueryResults4.1
Description: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.
02:13:25: Error: DBAmp.exe was unsuccessful.
02:13:25: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe Export LeadFeed_Previous "LONTER03" "Salesforce_backups_live" "salesforce"
--- Ending SF_Replicate. Operation FAILED.
1 person has
this problem
+1
Reply
  • What we have noticed is that the Chatter Feed tables have started to consume massive amounts of api calls to retrieve. This is primarily due to the fact that salesforce only returns 1 row per api call for some of the Feed tables. Any org with significant Chatter usage will start to encounter problems due to this issue.

    The next release of DBAmp eliminates the Chatter Feed tables from sf_replicateall and sf_refreshall. If you are capable of making stored proc modifcations I can send you the changes.

    Another alternative would be to discontinue use of the replicateall proc and instead just replicate/refresh the tables you really need. When you do this you eliminate any future nasty surpises with new sf tables.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Thanks Bill, I see, strange that the feed tables work that way, but that explains why the lead_feed table seemed to cause the limit to be reached, we have 41000 calls per 24 hours and I just loaded about 85k Leads, and until you explained the above i couldnt see why if the batch size was 200 why our limiit was exceeded, I think now i understand why!

    I can make changes to stored procs so would be grateful for the newer version please?

    I'll also take on board the refresh/replicating only the tables required.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • For sf_replicateall, add the following lines before the call to sf_replicate:


    -- Feed tables consume huge quantities of API calls
    -- Therefore, we skip them. Comment out the lines if you would like to include them.
    if RIGHT(@tn,4) = 'Feed' CONTINUE

    -- Call SF_Replicate for this table
    begin try
    exec SF_Replicate @table_server, @tn


    For sf_refreshall, add the following lines before the call to sf_refresh:


    -- Feed tables consume huge quantities of API calls
    -- Therefore, we skip them. Comment out the lines if you would like to include them.
    if RIGHT(@tn,4) = 'Feed' CONTINUE

    if @timestampfield <> 'SystemModstamp' and @timestampfield <> 'CreatedDate'
    begin
    -- print @tn + ' ' + @queryable
    if ((@replicate_on_schema_error = 'Yes' or @replicate_on_schema_error = 'yes') and @queryable = 'true')
    begin
    -- Call SF_Replicate for this table
    begin try
    exec SF_Replicate @table_server, @tn
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated