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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
philhansen
New Member

Stuck warehouse query using my CUs

I started running out of capacity and noticed that a warehouse was using most of my CUs. The warehouse has a single table with 20 rows. When I run the query below, it shows a process ID that's been running in the warehouse for 14 hours, and when I try to kill it with kill PID, it says only user processes can be killed. It's a select process, so I'd think I could kill it.

 

SELECT session_id, status, command, start_time, total_elapsed_time
FROM sys.dm_exec_requests
WHERE status = 'running';

How do I kill the process to stop the CU usage?
6 REPLIES 6
philhansen
New Member

The query from @Anonymous helped me identify the query as a system query, shown below.

(@source nvarchar(256))SELECT type, data FROM sys.fn_MSxe_read_event_stream (@source, 0)


I can't kill it because it's a system process, and when I pause and restart my capacity, the query comes right back. I opened a ticket with our MS partner. 

Thanks for the response here. please keep posted updates here as these will help other community users with similar issues

v-prasare
Community Support
Community Support

Hi @philhansen,

We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.


@Anonymous & @Vinodh247 ,Thanks for your prompt response

 

 

 

Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support

Anonymous
Not applicable

Hi @philhansen ,

Try below things.

 

1. Cancel via Fabric UI, Go to your Warehouse in Fabric. Open the Query Activity tab. Find the running query and use the Cancel option (three dots menu). This is the supported way to stop CU consumption.

 

2. Restart the Warehouse Capacity, Restarting the capacity should clear stuck queries. However, if the query reappears after restart, it’s being re‑triggered by something like a pipeline or background job.

 

3. Check Pipelines or Connected Lakehouses,

 

pipelines loading data into Warehouses can get stuck and leave blocking queries behind. If you have a pipeline or scheduled job feeding the Warehouse, pause or disable it to see if the query stops.

 

4. Monitor Sessions, Use sys.dm_exec_requests with sys.dm_exec_sql_text to see the actual SQL text.

 

SELECT sqltext.TEXT, req.session_id, req.status, req.command,

       req.cpu_time, req.total_elapsed_time, req.blocking_session_id, req.start_time

FROM sys.dm_exec_requests req

CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext;

 

Note: This will confirm if the query is a system‑generated one SELECT * FROM [myTable] WHERE 1=2 is a common background query.

 

If my response as resolved your issue please mark it as solution and give kudos.

 

Thanks,

Dinesh

philhansen
New Member

I've restarted for the last two days to get capacity back each morning. This hasn't stopped the query. 

I don't have a Premier Access ID, so I can't open a Fabric ticket. I'm lost on what to do next or how to troubleshoot this query consuming my CUs.

Vinodh247
Super User
Super User

 

you cannot kill system or background processes in a fabric warehouse. The long running query you see is likely a system task (ex: stats gathering, maintenance, or metadata sync) that appears as a running session.

 

To stop CU consumption:

  1. Pause the warehouse - this immediately halts all compute and CU usage.

  2. Wait a minute, then resume it - this clears stuck system processes.

  3. If it persists, restart the fabric capacity or open a microsoft support ticket, as only microsoft can terminate internal sessions.

 

Please 'Kudos' and 'Accept as Solution' if this answered your query.

Regards,
Vinodh
Microsoft MVP [Fabric]
LI: https://www.linkedin.com/in/vinodh-kumar-173582132
Blog: vinsdata.in

Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.