Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Safwan
Helper I
Helper I

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 6
HimanshuS-msft
Community Support
Community Support

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

HimanshuSmsft_0-1708971867751.png

Thanks 
Himanshu

Hi @Safwan 

 

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.

Hi @Safwan 

 

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.

v-cboorla-msft
Community Support
Community Support

Hi @Safwan

 

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.

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

 

Thanks.

Linked service Edit options : 

kesavraj_1-1715106592377.png

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayFBCUpdateCarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.