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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
maxianren
New Member

problem connecting Azure DB PostgreSQL: Details: "PostgreSQL: Exception while reading from stream"

i have some connection problem with Azure PostgreSQL database,

some people mentioned here to add Command Timeout but dosen't work for me

Solved: Postgresql: Exception while reading from stream - Microsoft Power BI Community

is there anyone can help? thank you

 

maxianren_0-1639046311731.png

maxianren_1-1639046406006.png

 

7 REPLIES 7
v-janeyg-msft
Community Support
Community Support

Hi, @maxianren 

 

The issue seems more to be with the PostgreSQL driver itself getting time out on read.

Try this method:

vjaneygmsft_0-1639468062478.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

 

Best Regards,
Community Support Team _ Janey

maxianren_1-1639501092809.png

it seems not work..

 

Hi, @maxianren 

 

First you can try to clear permission and connect again,

vjaneygmsft_0-1639532560678.png

Check other ways to connect to PBI: 

PostgreSQL To Power BI: 3 Best Ways To Connect - Learn | Hevo (hevodata.com)

A similar solved thread:Solved: Azure PostgreSQL Direct Query? - Microsoft Power BI Community

Configure TLS connectivity in Azure Database for PostgreSQL

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

 

Best Regards,
Community Support Team _ Janey

yes i cleared permission and the problem remained

maxianren_0-1639732536339.png

i am trying to connect with odbc, but not worked yet..

 

Hi, @maxianren 

 

I was wrong, 0 can't be entered.

vjaneygmsft_0-1639734282717.png

About your error:

This can happen because of a firewall or other server-side configuration which stops data from streaming. The Azure PostgreSQL server needs to be inspected for firewall settings to ensure that it allows incoming calls originating from the PowerBI Service.

This can also be the result of a timeout - which might also cause the server to "forcibly close" the connection. Check the timeout settings on the server and perhaps increase that timeout to a value that will allow the query to complete.

A similar thread:

Solved: a problem connecting wiht postgresql database - Microsoft Power BI Community

Using odbc to configure the cloud Azure PostgreSQL database requires other settings, you can refer to the tutorial I shared before.

 

Best Regards,
Community Support Team _ Janey

amitchandak
Super User
Super User

@maxianren , there are 3-4 steps , please make sure all are taken care. Driver SSL, certificate etc

 

https://community.powerbi.com/t5/Power-Query/Connecting-to-PostgresSQL-hosted-on-AWS-RDS/td-p/135666
https://dataintoresults.com/post/powerbi-and-postgresql-ssl-lets-encrypt-and-gateway/
https://niftit.com/connecting-power-bi-to-postgresql/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

thanks amitchandak

it seems that the method metioned in your post works well for AWS, but for azure, how to download the public key and convert to certificate? i still don't understand SSH setting?

 

maxianren_3-1639062462013.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors