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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Error Message - Server Closed Connection Unexpectedly

Hello PBI Community

 

Just thi smonth I started getting the error message below. Is there a setting in Power BI  that times out if the query is running too long? If so, where can I find it? 

 

PBICurious_0-1655145215841.png

 

 

Much appreciate your time!

 

Thank you

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

For existing query, please try to modify it in the Power Query Editor's Advanced Editor.

 

vkkfmsft_0-1655454510830.png

let
Source = AmazonRedshift.Database("my_server", "my_db", [BatchSize = 1000]),
....

 

Best Regards,
Winniz

View solution in original post

6 REPLIES 6
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try the following methods to see if they solve the issue.

 

1. Please check if the issue is in the communication between client and server. Please review the following blog to troubleshoot this issue.

Connecting from Outside of Amazon EC2—Firewall Timeout Issue

2. In the advanced options of the Amazon Redshift connector, change the Batch Size to be 1000, so that it can send the data in batches which should make it run faster and not wait for the entire dataset.

 

 

Best Regards,
Winniz


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hello v-kkf-msft

 

Per your suggestion above, can I change the batch size to 1000 for a .pbix, I have already developed for my end users?

 

Screen Shot 1 & Screen Shot 2

Note: I'm currently using an ODBC connector for this existing .pbix

Screen Shot 3 & Screen Shot 4

Re: Changing the Batch size to 1000, I found Batch Size in Advance Options, but when I make the change to the size from 100 to 1000 my .pbix is prompting me to select my Sales and Revenue Table again from Redshift.

 The batch size may affect the data for these tables when I pull the data in again, but I need the batch size to affect the existing .pbix I have already built. I’m currently getting the error message per my current refresh attempts.

 

Is there a way for me to change the batch size for my existing .pbix?

 

Regards,

 

 

 

Screen Shot 1

 

PBICurious_4-1655410782341.png

Screen Shot 2

PBICurious_0-1655410019312.png

 

Screen Shot 3

PBICurious_2-1655410234000.png

Screen Shot 4

PBICurious_3-1655410261975.png

 

Hi @Anonymous ,

 

For existing query, please try to modify it in the Power Query Editor's Advanced Editor.

 

vkkfmsft_0-1655454510830.png

let
Source = AmazonRedshift.Database("my_server", "my_db", [BatchSize = 1000]),
....

 

Best Regards,
Winniz

Anonymous
Not applicable

Winniz

Going to give your suggestion a try.

 

Much appreciated

Thank you!

Anonymous
Not applicable

Hello Winniz

 

I'm receiving an error message, see below.

 

Regards,

 

PBICurious_0-1655760011468.png

 

Anonymous
Not applicable

Hello Winniz

 

Here is another attempt....

 

PBICurious_0-1655760692129.png

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.