Forum

Microsoft.Mashup.Co...
 
Notifications
Clear all

Microsoft.Mashup.Container.Loader.exe kills Excel after queries refresh

9 Posts
3 Users
0 Reactions
1,772 Views
(@jaryszek)
Posts: 177
Reputable Member
Topic starter
 

hi Guys,

i am refreshing few queries using button and code.

Sub RefreshAllOutputQueries()

Dim conn As WorkbookConnection

For Each conn In ThisWorkbook.connections
With conn.OLEDBConnection
.BackgroundQuery = False 'or true, up to you
.Refresh
End With
End If
Next conn

End Sub

And this is working fine but after code Power Query creates additional processes in my PC memory:

Screenshot_167.png

This is making my pc slow. How to get rid of them? Why Power Quert created them?

Best,
Jacek

 
Posted : 15/05/2021 3:45 am
Anders Sehlstedt
(@sehlsan)
Posts: 970
Prominent Member
 

Hello,

Not a really an answer to why these tasks are created, but you can always kill them if they are not needed.

Br,
Anders

 
Posted : 15/05/2021 5:35 am
(@jaryszek)
Posts: 177
Reputable Member
Topic starter
 

Hi,

thanks, i know how to kill task from task manager. 
I want to prevent them to still staying there after queries refreshed.

Best,
Jacek

 
Posted : 15/05/2021 6:37 am
Anders Sehlstedt
(@sehlsan)
Posts: 970
Prominent Member
 

Hello,

Well, my thought was that you could call the taskkill command from whithin your VBA code.

Br,
Anders

 
Posted : 15/05/2021 6:19 pm
(@jaryszek)
Posts: 177
Reputable Member
Topic starter
 

Hmm. it is force method to delete it. 

My question is why Power query doesnt kill the process alone? 
Why i have still this open? 

maybe i could finish power query somehow in code? 

Best,
Jacek

 
Posted : 16/05/2021 7:18 am
Anders Sehlstedt
(@sehlsan)
Posts: 970
Prominent Member
 

Hello,

I searched for the exe file and found this blog post, seems you get to live with it.
Question: does it behave differently if you run the .BackgroundQuery with yes parameter than with no parameter?

Br,
Anders

 
Posted : 17/05/2021 5:44 pm
(@jaryszek)
Posts: 177
Reputable Member
Topic starter
 

Hello Anders,

thanks.
Yes it is the same but refreshin time is faster or seems to be faster (and still goin in background). 

I have even more mashupContainers now.
Question is if they will kill my CPU ? 

If not how we can destroy it using VBA or some kind of PowerQuery process? 

I read here on forum that you can add one query with "ZZZZZZ" (to be refreshed as last one) to cheat PQ and finish all queries so i did:

1. I added table with only one row called "ZZZZZZZ_PQ" and now i refresh also it as last one (PQ takes queries alphabetically)
2. It didnt change anything - still mashups shows up.

Best,
Jacek

 
Posted : 18/05/2021 3:42 am
(@ritter911)
Posts: 1
New Member
 

Happened to me this morning too. Not sure what is happening with the Mashup. I run my refresh, all data is brought back but the Mashup.Container.Loader stays there. If I try to load the data again, I get an error that it doesn't work. I need to kill the mashup for the refresh to work a second time.

I'm getting my data from a website. Not sure if this is the problem. This is the first time I have a problem with Power Query not refreshing...

 
Posted : 04/06/2021 11:45 am
(@jaryszek)
Posts: 177
Reputable Member
Topic starter
 

Try my solution from post above. I think that it helped. 

 
Posted : 05/06/2021 4:40 am
Share: