Title: Error Message: Maximum SOQL offset allowed is 2000
Last modified: November 2, 2018

---

# Error Message: Maximum SOQL offset allowed is 2000

 *  Resolved [jonsayer](https://wordpress.org/support/users/jonsayer/)
 * (@jonsayer)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-message-maximum-soql-offset-allowed-is-2000/)
 * I’ve got an error message in my logs every single time that my pull action runs:
 * Error: 400: on Salesforce http request
 * URL: [https://yesmedia.my.salesforce.com/services/data/v40.0/query?q=SELECT+WordPress_Id__c%2C+Id%2C+Phone%2C+npo02__Formal_Greeting__c%2C+Digital_Access_Email__c%2C+Subscription_Expiration_Date__c%2C+Subscriber_Status__c%2C+Subscription_Types__c%2C+Digital_Access_Expiration_Date__c%2C+Number_of_Gift_Subscriptions_Given__c%2C+BillingStreet%2C+BillingCity%2C+BillingState%2C+BillingPostalCode%2C+BillingCountry%2C+Current_Subscription_is_Gift__c%2C+Current_Subscription_is_Auto_Renewal__c%2C+Company_Name_for_Magazine_Mailing_Label__c%2C+Primary_Contact_First__c%2C+Primary_Contact_Last__c%2C+Dedicated_Friend_Status__c%2C+Subscriber_ID__c%2C+First_Subscribed_Date__c%2C+Current_Auto_Renewal_Amount__c%2C+DF_Next_Transaction_Date__c%2C+Current_Recurring_Trans_Payment_Method__c%2C+Subscription_Last_Renewal_Date__c%2C+Web_Sync_Time__c%2C+CreatedDate+FROM+Account+WHERE+Web_Sync_Time__c+%3E+2018-10-31T23%3A04%3A37Z+ORDER+BY+Web_Sync_Time__c+ASC+LIMIT+40+](https://yesmedia.my.salesforce.com/services/data/v40.0/query?q=SELECT+WordPress_Id__c%2C+Id%2C+Phone%2C+npo02__Formal_Greeting__c%2C+Digital_Access_Email__c%2C+Subscription_Expiration_Date__c%2C+Subscriber_Status__c%2C+Subscription_Types__c%2C+Digital_Access_Expiration_Date__c%2C+Number_of_Gift_Subscriptions_Given__c%2C+BillingStreet%2C+BillingCity%2C+BillingState%2C+BillingPostalCode%2C+BillingCountry%2C+Current_Subscription_is_Gift__c%2C+Current_Subscription_is_Auto_Renewal__c%2C+Company_Name_for_Magazine_Mailing_Label__c%2C+Primary_Contact_First__c%2C+Primary_Contact_Last__c%2C+Dedicated_Friend_Status__c%2C+Subscriber_ID__c%2C+First_Subscribed_Date__c%2C+Current_Auto_Renewal_Amount__c%2C+DF_Next_Transaction_Date__c%2C+Current_Recurring_Trans_Payment_Method__c%2C+Subscription_Last_Renewal_Date__c%2C+Web_Sync_Time__c%2C+CreatedDate+FROM+Account+WHERE+Web_Sync_Time__c+%3E+2018-10-31T23%3A04%3A37Z+ORDER+BY+Web_Sync_Time__c+ASC+LIMIT+40+)**
   OFFSET+2290** **Message: Maximum SOQL offset allowed is 2000** Code: 400
 * Looks like the plugin is calling for an offset that is exceeding Salesforce’s
   maximum. We did have a large number of records we were trying to sync around 
   this time.
 * How do I reset the offset so that I can start syncing again?
 * How do I ensure large batches of updates sync?
    -  This topic was modified 7 years, 7 months ago by [jonsayer](https://wordpress.org/support/users/jonsayer/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-message-maximum-soql-offset-allowed-is-2000/#post-10842950)
 * In the meantime you can reset the value for object_sync_for_salesforce_pull_last_sync_Account
   and it will start over. We have a fix coming in 1.5.1 soon that will cause the
   plugin to clear the query when it reaches that 2000 offset limit.
 * As far as large batches, we don’t currently have a stable way of doing this. 
   Salesforce limits the offset, as you can see. It does have a batchSize parameter,
   but it does not enforce it, which can cause the server where WordPress is running
   to crash.
 *  Thread Starter [jonsayer](https://wordpress.org/support/users/jonsayer/)
 * (@jonsayer)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-message-maximum-soql-offset-allowed-is-2000/#post-10842957)
 * [@jonathanstegall](https://wordpress.org/support/users/jonathanstegall/) Thanks
   for the super fast response!
 * Where do I reset the value for object_sync_for_salesforce_pull_last_sync_Account?
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-message-maximum-soql-offset-allowed-is-2000/#post-10842958)
 * [@jonsayer](https://wordpress.org/support/users/jonsayer/) it’s in the wp_options
   table of the database. The interface does not have a way to do this, hence the
   need for a fix in 1.5.1.
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/error-message-maximum-soql-offset-allowed-is-2000/#post-10845401)
 * [@jonsayer](https://wordpress.org/support/users/jonsayer/) I believe we’ve resolved
   this issue in 1.5.1.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error Message: Maximum SOQL offset allowed is 2000’ is closed to new 
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/error-message-maximum-soql-offset-allowed-is-2000/#post-10845401)
 * Status: resolved