Forum Discussion

jnlucas's avatar
jnlucas
Regular Visitor
3 days ago

Trasaction deadlocked on lock resources

Hi, 

I created a Dataflow Gen2 in Microsoft Fabric that loads multiple tables into a warehouse. Every time I run the dataflow, I receive the following error message:

Couldn't refresh the entity because of an issue with the mashup document MashupException.Error: Microsoft SQL: Transaction (Process ID 206) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. Details: Reason = DataSource.Error;ErrorCode = 10478;DataSourceKind = Warehouse;DataSourcePath = Warehouse;DataSourceKind.2 = SQL;DataSourcePath.2 = qenzxdde3pdenc5pgrl56uss44-3nktrgkfckbedi5tclkxsvoogi.datawarehouse.fabric.microsoft.com;WH_Bronce;Message = Transaction (Process ID 206) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.;ErrorCode = -2146232060;Number = 1205;Class = 13;State = 51;ConnectionId = 090e3c20-db6d-492b-b2a6-48814400d26f;Microsoft.Data.Mashup.Error.Context = User GatewayObjectId: 714e5a6b-cca0-4a5a-bb6b-7c891e9991ba". Código de error: 104100. (Id. de solicitud: 4926601a-0aa6-4cdf-86d4-e84f3cbd1767).

Any idea what it might be? 

 

Thank you in advance. 

3 Replies

  • This error usually occurs when two or more transactions try to access or modify the same Warehouse resources at the same time, creating a deadlock.

    I would check the following:

    1. Check concurrent operations: Make sure no other Dataflow, pipeline, or SQL query is writing to the same Warehouse tables while the Dataflow Gen2 is running.
    2. Avoid parallel writes: If multiple entities load into the same Warehouse simultaneously, try disabling parallel loading or splitting the refresh into sequential batches.
    3. Check destination tables: Look for overlapping loads, truncate-and-load operations, or other processes that modify the same tables.
    4. Retry the transaction: If the deadlock is occasional, configure a retry in the pipeline or orchestration process.
    5. Review query performance: Optimize transformations and SQL operations to reduce the time transactions hold locks.
    6. Test individual tables: Run the Dataflow with one table at a time to identify which entity causes the deadlock.

    I would first check for concurrent writes to the Warehouse, then test the Dataflow entities individually. If the issue persists, capture the timing of the failed refreshes and check whether other workloads were running at the same time.

  • jnlucas's avatar
    jnlucas
    Regular Visitor

    Hi Shubham, 

    Thank you for your quick reply. 

    I've already checked all that. The DataFlow Gen 2 is the only process writing to the Warehouse. However, it looks like the DataFlow is processing all its tables in parallel, which might causing the conflict.  

    The deadlock occurs every time I run the DataFlow so it's an not occasional issue.

    I duplicated the DataFlow and ran it again with fewer tables, and in this case it worked, but as soon as I increased the number of tables beyond 7/8 tables the error started occuring again. 

    Any help will be welcome. 

     

  • jnlucas​ 

    This error suggest a SQL deadlock in Fabric Warehouse, where multiple transactions compete for the same resources.

    Possible reasons:

    • Multiple dataflows or pipelines running simultaneously.
    • Concurrent writes to the same warehouse tables.
    • Overlapping notebook or SQL operations.

    Recommended approach:

    1. Check concurrent executions in Fabric Monitoring Hub.
    2. Avoid overlapping refreshes and concurrent writes to the same tables.
    3. Try sequential loading and rerun the failed refresh.

    If the issue persists, investigate the specific destination table and loading operation.

    If this helps, ✓ Mark as Kudos | Help Other