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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power BI Deadlock, no issues while ran on SSMS

Hi all,

I am having Deadlocks issues while refreshing data in PBI Desktop. The problem occurs only from time to time and If I'll try to refresh one again sometimes it works. There are no problems when I run these queries in SQL SMS.

 

I have curently some tables from SQL server and some being created (combined of two other tables). When I try to refresh it drops deadlock issue with table being created of other tables.

 

Is this because tables from server are not fully refreshed?

 

Table A

Table B

Table C - being created of tables A and B

 

It drops Deadlocks sometimes on tables A or B and sometimes on Table C.

 

Any idea what to do?

 

thanks

 

daniel

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

I guess 'table c' is created in the query editor and you haven't turned on 'parallel loading' options, right?

If this is a case, I think it may be caused by the loading order of query tables, I'd like to suggest you turn on 'parallel loading' to prevent this issue.
Power bi is tried to load the merged table before its source data tables. (For example, C required source A and B, but A or B will be loading after C, so it deadlock with loading source data tables)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi,

thank you for this reply.

 

This is exactly what I was thinking about in first place and was looking for option where you can set order for tables to load.

 

Apparently this option was turned on all the time. Shouldn't I turn it off instead, to prevent table C (created in the query editor) from loading while tables A and B are not fully loaded yet?

 

As mentioned above, IT guy said "We are aware of the problem and this is because we have some issues on server". I know this can be one from many resons why it is deadlocking though.

 

thanks

 

daniel

HI @Anonymous,

How your database connections configured? Is that device running with a heavy workload? If they did not exist enough ideal connection session resources, the parallel loading feature also not works for this scenario.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
vanessafvg
Super User
Super User

@Anonymous  are you doing reads with (nolock) in your sql?   If not i suggest you do uncommited reads as its possible the tables are updating or there is a table lock on them while you trying to pull down the data.  





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Hi Vanessa,

 

I don't really want to use NOLOCK as this may cause some issues with numbers. Although, your post forced me to go to IT guys and ask them about it and they said its something with server itself and they are working on fixing it.

 

I'll give you point as your reply really helped with getting to the point where I am satisfied.

 

thanks

 

daniel

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.