DBAmp Error – “QUERY_TIMEOUT: Your query request was running for too long.”

  • 11 December 2023
  • 0 replies

Userlevel 1

This error indicates that the request from your query took too long and timed out on Salesforce’s servers. This timeout limitation is set by Salesforce, so the only solution is to improve the speed of your query. 

If you see this error when querying a Salesforce object, adding a SELECT TOP statement to your query to reduce the number of rows requested can resolve this. Adding filters to your query to reduce the number of columns requested can fix the issue as well. The following is an example of a query with a SELECT TOP: 

SELECT TOP 10 * FROM SALESFORCE_LS.CData.Salesforce.Contact 

If you see this error when using stored procedures, you should enable the Bulk API option, which is better equipped to handle large tables than the default Web Services API. Check to see if the Salesforce object supports the PKChunk option for the Bulk API, as it is advised to use this option: 


If PKChunking is not supported by the Salesforce object, enabling the standard Bulk API option should fix the issue. If the error persists with the Bulk API enabled, lower the Batch Size so less rows are processed per request. 

You can find instructions on how to enable the Bulk API and PKChunk options, as well as changing the Batch Size for each stored procedure in the DBAmp documentation: 


This topic has been closed for comments