How to fix "Failure happened on 'Source' side A task was canceled" error

thara kollu 0 Reputation points
2024-05-28T18:42:40.6+00:00

Data load from Salesforce object with 1million records fails with the below error in Azure Data Factory:

Failure happened on 'Source' side. 'Type=System.Threading.Tasks.TaskCanceledException,Message=A task was canceled.,Source=mscorlib,'

The data load for other objects with <200K records was successful. We checked the bulk Api jobs on Salesforce and the queries are completed successfully.

How to debug & fix the error?

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,907 questions
{count} votes

2 answers

Sort by: Most helpful
  1. hossein jalilian 4,615 Reputation points
    2024-05-28T20:01:12.95+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    The error indicates that the task was canceled, likely due to a timeout. Increase the timeout values in the ADF copy activity to allow more time for the large data transfer.

    If you're using a self-hosted IR, increase the node concurrency to allow more parallel data transfers. In the IR's settings, increase the Maximum Node Concurrency value.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments

  2. Harishga 4,880 Reputation points Microsoft Vendor
    2024-06-03T19:39:15.4733333+00:00

    Hi thara kollu
    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    ASK:
    Data load from Salesforce object with 1million records fails with the below error in Azure Data Factory:Failure happened on 'Source' side. 'Type=System.Threading.Tasks.TaskCanceledException,Message=A task was canceled.,Source=mscorlib,'

    The data load for other objects with <200K records was successful. We checked the bulk Api jobs on Salesforce and the queries are completed successfully.

    How to debug & fix the error?

    Solution:
    Based on this the thread (https://learn.microsoft.com/en-us/answers/questions/1669230/salesforce-v2-link-service-doenst-work-error-messa?comment=question#newest-question-comment), we tried with salesforce legacy connector and the Contact data load worked for one million records.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments