Data Factory Copy - SQL Azure Timeout

Mike McGuinness 26 Reputation points
2022-02-01T18:09:56.543+00:00

I have a Copy Data task in a pipeline that keeps timing out. The task is supposed to copy 399,113 rows from a CSV file to an Azure SQL table. Works fine using SSIS.

The ADF sink fails every time after about 2:12 or 2:13 minutes into the "Writing to sink" step.

I increased the Azure SQL Database DTUs from 20 to 50, but it had zero effect. 170288-adf-copy-timeout.png

Operation on target Import AVS SEC Pricing from CSV failed: ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed. Please search error to get more details.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.,Source=.Net SqlClient Data Provider,SqlErrorNumber=-2,Class=11,ErrorCode=-2146232060,State=0,Errors=[{Class=11,Number=-2,State=0,Message=Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.,},{Class=0,Number=3621,State=0,Message=The statement has been terminated.,},],''Type=System.ComponentModel.Win32Exception,Message=The wait operation timed out,Source=,'

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
0 comments No comments
{count} votes

12 answers

Sort by: Most helpful
  1. j3vr0n 1 Reputation point
    2022-02-15T00:31:50.177+00:00

    I'm also getting a similar error when trying to upsert...a normal copy task works fine.

    ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed. Please search error to get more details.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    0 comments No comments

  2. Cloud_Knight 1 Reputation point
    2022-02-17T09:18:33.517+00:00

    Any update on this issue? I just want to go with Copy activity upsert instead of dataflows and stuck because of this.

    0 comments No comments

  3. Mike McGuinness 26 Reputation points
    2022-02-17T15:54:57.87+00:00

    Hi everyone, I haven't had any resolution from MS on my threads.

    My work-around was to truncate the sink table, remove the primary key index, and just bulk insert records, then re-create the index post import. Fugly, but working.

    I suspect the timeout (in my case) is a flaw with ADF using temp DB for upserts when there are lots of records (even though my records were very small and simple). I haven't had time to try using my own staging table yet to see if that fixes the issue.


  4. Venkatesh Srinivasan 86 Reputation points
    2022-04-07T16:50:31.663+00:00

    Hey guys,

    Does anybody have solution for timeout issue while copying? I'm also facing the same issue.

    Please let me know if you any workaround. Thanks!

    0 comments No comments

  5. Sameer Kesava 1 Reputation point
    2022-06-06T12:04:25.377+00:00

    I am also having the same issue copying data (using upsert) from one Azure SQL database to another. The table size is about 1.3 GB (~ 57.7 million rows). Copy to interim (TempDB true) table works but from interim to sink it times out after 2 min similar to @Mike McGuinness 's in the original post. Changed to smaller "write batch size" 100000 to 1000, increased DTUs from 10-400 (at 400, it only uses 15% of DTUs) but nothing works.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.