cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MelissaSnell
Helper I
Helper I

Possible BUG? Power BI Personal Gateway Does not close Database connections to PostGreSQL

We have about 6 datasets that are set to refresh on a schedule. This works as expected. However periodically the source PostgreSql database starts to deny connections because the number of connections has reached its limit.

Viewing the database logs shows that there are multiple connections open from the IP address of the Workstation that hosts the Power BI Personal Gateway.

 

Restarting the workstation closes the open connections.

 

I would expect the connections to be closed following the refresh of an individual dataset.

 

 

 

 

9 REPLIES 9
Bikougna
Regular Visitor

Any update? as it is still an issue on late 2019...

Greg_Deckler
Super User IV
Super User IV

I've seen some similar issues posted regarding the gateway not closing connections properly to databases so likey some sort of bug.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I was hoping to be able to use Task Scheduler to stop and re-start the Gateway as a service, to save me from having to re-boot the workstation once or twice a week, but can't seem to see it listed, even though I installed it as an Administrator.

 

In addition I have just installed the October 22 release of the Personal Gateway, that seems to hold some promise of solving other issues that I was getting, so am hopeful that it might address this one as well

As a workaround I managed to get the Data Management Service installed during the Gateway installation process and now I am running a batch file using Windows Task Scheduler with a NET STOP SLEEP 120 NET START kind of thing.

 

I am awaitng feedback from the DBA to see if this is a viable work around

Melissa did you have any luck with this workaround in the end? The Gateway is still leaking connections for me, so clearly this bug has not been fixed.

 

I've tried setting the task scheduler to do a reboot but this doesn't work as Power BI doesn't recognise that the Gateway is active upon the reboot. It would be very interesting to hear about your experiences with this issue.

For anyone that encounters this in the future. This is the batch file i've used over the last few days to prevent the connection leaks from occuring.

 

net stop PBIEgwService
Taskkill /IM GWConfig.exe /F
timeout /t 30
net start PBIEgwService
"C:\Users\Administrator\AppData\Local\Power BI Personal Gateway\1.0\Configurator\GWConfig.exe"
Exit

 

 

As well as rebooting the service it's necessary to restart GWConfig. Without this the web client doesn't recognise that a Gateway is online. It's also necessary to have a taskkill on the GWConfig to prevent multiple instances being active.

This is still an issue for us. 

 

I can't find anything in the Gateway updates that suggestst that this problem is even recognised.

 

The workaround does drop the connections, but the number of concurrent connections is building up now prior to the closing of the connections to levels that are starting to cause issues with other systems that require connections.

 

Does anyone know if this is going to be dealt with?

We're also seeing this issue.

 

The poor handling of connections also results in a failed refresh if you do a database restore of the source Postgres database. Personal Gateway has to be restarted in order to flush out its connections and reconnect successfully.

 

We're currently having to periodically run a variation of the suggested script (updated for Personal Gateway 2.0) to restart our gateway. 

 

 

Taskkill /IM GWConfig.exe /F
timeout /t 5
& "C:\Users\Administrator\AppData\Local\Power BI Gateway - Personal\2.0\Configurator\GWConfig.exe"
Exit

 

 

Any permanent solution for this bug ? I see that it has been discussed since 2015.

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors