Forum Discussion

jackbettles's avatar
jackbettles
Frequent Visitor
10 months ago
Solved

Idle Spark Executor consuming all CU's for full Day

Looking at the Logs, it appears that after completing my Spark Executor stood idle for 18hours whilst consuming active CU's

 

This resulted in a usage of 21000% of our CU's for one day, which is obviously not great but I'm confused how it was able to happen considering we have a spark timeout of 20mins, and this is a completley isolated event.

 

We're currently throttled and unable to do any interactive requests and have been for the last day.

My question is what can I do to prevent this usage, as the same notebook typically consumes less than 2000Cu's per day, and this time consumed 180k due to this stuck executor

  • Hi jackbettles ,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you lbendlin for the prompt response.

    This happens when a Spark session finishes running but does not fully shut down, so Fabric keeps the executor alive and continues consuming CU’s despite being idle. To prevent this, make sure each notebook explicitly closes its Spark session as already suggested by lbendlin,because the platform timeout does not always stop stuck executors. If you run notebooks through Pipelines, enable the option to stop the session after each run. Also review your workspace’s active Spark sessions in Monitor --> Apache Spark to catch any that remain open unexpectedly. These steps ensure executors are released properly and cannot consume CU’s for hours when idle.

3 Replies

  • At the end of each notebook you MUST explicitly terminate the spark session unless you know there is a follow-up notebook run coming up.

  • v-venuppu's avatar
    v-venuppu
    Icon for Community Support rankCommunity Support

    Hi jackbettles ,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you lbendlin for the prompt response.

    This happens when a Spark session finishes running but does not fully shut down, so Fabric keeps the executor alive and continues consuming CU’s despite being idle. To prevent this, make sure each notebook explicitly closes its Spark session as already suggested by lbendlin,because the platform timeout does not always stop stuck executors. If you run notebooks through Pipelines, enable the option to stop the session after each run. Also review your workspace’s active Spark sessions in Monitor --> Apache Spark to catch any that remain open unexpectedly. These steps ensure executors are released properly and cannot consume CU’s for hours when idle.

  • v-venuppu's avatar
    v-venuppu
    Icon for Community Support rankCommunity Support

    Hi jackbettles ,

    I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

    Thank you.