Forum Discussion
Pyspark code running twice causing a LIVY status = DEAD
- Anonymous2 years ago
Hi mkj1213
I feel like the number of Jobs doesn't mean that the code has run the same number of times. I made some test based on your code (have made some modifications to fit my data). In the following images, you will see that it experienced 7 Spark jobs.
When I query data from the result delta table, it doesn't show any duplicated rows. This means the code runs only once although it shows 7 Spark jobs.
According to my research, this "LIVY status = DEAD" error is more like a result of a lack of some kind of resource or a resource that goes out of limit. I find an Azure Synapse Analytics Blog related to this error as below. According to the solution in it, you can try to increase the node size of the Spark pool which is used to run the notebook.
Livy is dead and some logs to help. - Microsoft Community Hub
Here are some Fabric documentations about setting Spark pool:
Workspace administration settings in Microsoft Fabric - Microsoft Fabric | Microsoft Learn
Manage settings for data engineering and science capacity - Microsoft Fabric | Microsoft Learn
Hope this will be helpful!
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi mkj1213 This is my testing result with two aggregation methods. It includes 6 spark jobs the first time.
The second time:
Thanks for the reply, i am wondering how large is the data in bing_covid_19_data table?
- Anonymous2 years agoNot applicable
This is a small sample data. The underlying parquet file is around 51MB and the table has around 4.7 million rows data.
If you run the code cell with less data from the same tables, will the error occur? If not, maybe you can consider splitting the data and running separately to aggregate data from different time periods.
In addition, did you try increase the node size or number of nodes? Will this have a better result?
What's more, you may try using Fabric Spark monitoring to find more details behind a Spark job of the notebook.
View browse item's recent runs - Microsoft Fabric | Microsoft Learn
Monitor Spark jobs within a notebook - Microsoft Fabric | Microsoft Learn
Best Regards,
Jing