<@U04S8PLJWMT> Why salesforce connector taking lon...
# ask-ai
k
@kapa.ai Why salesforce connector taking long time to read records?
k
The Salesforce connector in Airbyte can take a long time to read records for several reasons, as highlighted in the knowledge sources: 1. API Rate Limits: The connector is restricted by Salesforce's daily API rate limits. When these limits are reached, the sync ends early and resumes in the next run. This can slow down the overall data extraction process, especially for large datasets. Incremental sync is recommended to handle this limitation efficiently [Salesforce connector documentation](https://docs.airbyte.com/integrations/sources/salesforce#rate-limiting). 2. BULK API vs REST API Usage: The connector uses the Salesforce BULK API for large data extractions (recommended for more than 2,000 records), but falls back to the REST API for objects not supported by BULK API or with unsupported columns. The REST API is generally slower and can consume more API quota, impacting performance [Salesforce connector documentation](https://docs.airbyte.com/integrations/sources/salesforce#rate-limiting). 3. Connector Version and Performance Trade-offs: Upgrades to newer connector versions may introduce changes that prioritize stability over speed, resulting in slower syncs. Users have reported that newer versions can be significantly slower than previous ones, even after increasing resource allocations [Airbyte forum discussion](https://discuss.airbyte.io/t/2416). 4. Query Complexity and Timeouts: Large or complex queries can result in timeouts (e.g.,
QUERY_TIMEOUT
errors). The recommended workaround is to simplify SOQL queries, but this is not always feasible in ELT scenarios. The connector may not always handle these errors optimally, leading to incomplete or slow syncs [Airbyte forum discussion](https://discuss.airbyte.io/t/2775). 5. Resource Allocation: Insufficient memory or CPU allocated to Airbyte pods (especially the temporal pod) can cause syncs to stall or run slowly. Increasing resources may help, but sometimes performance remains within the expected range for the connector [Airbyte forum discussion](https://discuss.airbyte.io/t/1612). 6. Connector Implementation Overhead: There is inherent overhead in using Airbyte connectors compared to direct API calls. Users have observed that custom connectors can be several times slower than direct requests, likely due to additional processing, logging, and error handling in Airbyte [Airbyte forum discussion](https://discuss.airbyte.io/t/4215). In summary, slow performance can be due to Salesforce API limitations, connector design choices, resource constraints, and the complexity of the data being synced. If you are experiencing unusually slow syncs, consider checking your connector version, resource allocation, and whether your syncs are hitting API rate limits or timeouts. For very large datasets, using the BULK API and incremental sync modes is recommended where possible.