- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

2 years later the same
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Any update? as it is still an issue on late 2019...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I've seen some similar issues posted regarding the gateway not closing connections properly to databases so likey some sort of bug.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
07-17-2024 11:14 AM | |||
03-27-2024 02:03 AM | |||
06-24-2024 12:56 PM | |||
07-24-2024 01:24 AM | |||
12-08-2023 03:05 AM |
User | Count |
---|---|
27 | |
25 | |
25 | |
13 | |
9 |
User | Count |
---|---|
24 | |
19 | |
16 | |
13 | |
10 |