Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Copying data gets failed

Hi,

I was copying data from postgres to lakehouse in fabric. Some tables get easily copied but for some tables the task gets failed det to the following error:

 

Failure happened on 'Source' 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,'

6 Replies

  • v-cboorla-msft's avatar
    v-cboorla-msft
    Microsoft Employee

    Hi Anonymous, 

     

    Thanks for using Fabric Community.

     

    The error you're encountering, "Npgsql.NpgsqlException: Exception while reading from stream," indicates that the Dataflow Gen 2 task couldn't establish a stable connection with the PostgreSQL source while copying data to the lakehouse in Fabric. 

    There is a default timeout of 30s for requests with a postgres connection. You can add Timeout=600;CommandTimeout=0; to your connection string .

    Timeout is to establish the connection, and CommandTimeout is the timeout for the command itself (in second, 0 means infinity)

    You can refer to this link for more details:

     https://www.npgsql.org/doc/connection-string-parameters.html

     

    I hope this information helps. Please do let us now if you still have any further questions.

     

    Thanks.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-cboorla-msft, where should I add Timeout and CommandTimeout parameters, can you help me with this.

       

      Thanks.

  • HimanshuS-msft's avatar
    HimanshuS-msft
    Microsoft Employee

    Hello Anonymous , 
    You can make the update as shown the snapshot below .

    Thanks 
    Himanshu

    • v-cboorla-msft's avatar
      v-cboorla-msft
      Microsoft Employee

      Hi Anonymous 

       

      We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
      In case if you have any resolution please do share that same with the community as it can be helpful to others.
      Otherwise, will respond back with the more details and we will try to help.


      Thanks.

      • v-cboorla-msft's avatar
        v-cboorla-msft
        Microsoft Employee

        Hi Anonymous 

         

        We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others.
        If you have any question relating to the current thread, please do let us know and we will try out best to help you.
        In case if you have any other question on a different issue, we request you to open a new thread.


        Thanks.