ADF copy activity failed giving following error. How to avoid this failure?

Grover, Jyoti 40 Reputation points
2024-04-03T20:22:13.3366667+00:00

Activity failed because an inner activity failed; Inner activity name: Copy data from sf_src to sf_prod, Error: Failure happened on 'Sink' side. 'Type=Npgsql.NpgsqlException,Message=Exception while reading from stream,Source=Npgsql,''Type=[System.IO].IOException,Message=Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.,Source=System,''Type=[System.Net].Sockets.SocketException,Message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond,Source=System,'

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

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 31,716 Reputation points Microsoft Employee
    2024-04-04T06:40:34.55+00:00

    Hi Grover, Jyoti ,

    Welcome to Microsoft Q&A platform and thanks for posting your query here.

    As per my understanding you are trying to copy data using ADF and facing the above mentioned error. However, it is not clear what is the source and sink datastore but as per my understanding , it seems that the data movement is expected from PostGre SQL as the source. Kindly confirm if that is correct.

    A connection to an Azure Database for PostgreSQL Linked Service requires a Connection String. The required properties for the Connection String are Server Name, Database Name, Encryption Method, Validate Server Certificate, User Name, and Password. These are the mandatory fields, however , apart from these properties, there are the below non-mandatory fields including connectionTimeout which you can consider adding .

    Kindly try appending the timeout in connection string in the linked service additional properties and see if that help resolve the issue.

    User's image

    For more details, kindly checkout the official documentation: Copy data from PostgreSQL using Azure Data Factory or Synapse Analytics

    Hope it helps. Thankyou