You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Handle Livy errors on Apache Spark in Synapse
2
+
title: Handle Livy Errors on Apache Spark in Synapse
3
3
description: Learn how to handle and interpret job failures on Apache Spark in Synapse Analytics.
4
4
author: Niharikadutta
5
+
ms.author: nidutta
6
+
ms.date: 02/27/2025
5
7
ms.service: azure-synapse-analytics
6
-
ms.topic: overview
7
8
ms.subservice: spark
8
-
ms.date: 08/29/2022
9
-
ms.author: nidutta
9
+
ms.topic: error-reference
10
10
---
11
11
12
12
# Interpret error codes in Synapse Analytics
13
13
14
-
There are many factors that can play into why a spark application fails in Azure Synapse Analytics today. For instance, it can be due to a system error or even a user related error. Previously, all errors corresponding to failing jobs on
15
-
Synapse Analytics were surfaced with a generic error code displaying *LIVY_JOB_STATE_DEAD*. This error code gave no further insight into why the job has failed. It requires significant effort to identify the root cause by digging into the driver, executor, Spark Event, Livy logs, and find a resolution.
14
+
There are many factors that can play into why a spark application fails in Azure Synapse Analytics today. For instance, it can be due to a system error or even a user related error. Previously, all errors corresponding to failing jobs on Synapse Analytics were surfaced with a generic error code displaying *LIVY_JOB_STATE_DEAD*. This error code gave no further insight into why the job failed. It requires significant effort to identify the root cause by digging into the driver, executor, Spark Event, Livy logs, and find a resolution.
16
15
17
-
:::image type="content" source="./media/apache-spark-error-classification/apache-spark-old-error-view.png" alt-text="Screenshot of Apache Spark error code without detailed message." lightbox="./media/apache-spark-error-classification/apache-spark-old-error-view.png" border="true":::
16
+
:::image type="content" source="media/apache-spark-handle-livy-error/apache-spark-old-error-view.png" border="true" alt-text="Screenshot of Apache Spark error code without detailed message." lightbox="media/apache-spark-handle-livy-error/apache-spark-old-error-view.png":::
18
17
19
18
We have introduced a more precise list of error codes that replaces the previous generic message. The new message describes the cause of failure. Whenever a job fails on Azure Synapse Analytics, the error handling feature parses and checks the logs on the backend to identify the root cause. It then displays a message to the user on the monitoring pane along with the steps to resolve the issue.
20
19
21
-
:::image type="content" source="./media/apache-spark-error-classification/apache-spark-new-error-view.png" alt-text="Screenshot of Apache Spark error code with detailed message." lightbox="./media/apache-spark-error-classification/apache-spark-new-error-view.png" border="true":::
20
+
:::image type="content" source="media/apache-spark-handle-livy-error/apache-spark-new-error-view.png" border="true" alt-text="Screenshot of Apache Spark error code with detailed message." lightbox="media/apache-spark-handle-livy-error/apache-spark-new-error-view.png":::
22
21
23
22
## Enable error classification in Synapse
24
23
25
24
The error classification feature can be enabled or disabled by setting the following Spark configuration to `true` or `false` at the job or pool level:
26
25
27
26
`livy.rsc.synapse.error-classification.enabled`
28
27
29
-
The following section lists some error types that are currently supported. We are continuously refining and adding more to these error codes by improving our model.
28
+
The following section lists some error types that are currently supported. We're continuously refining and adding more to these error codes by improving our model.
30
29
31
30
## Error code categories
32
31
33
32
Each error code falls under one of the following four buckets:
34
33
35
-
1.**User** - Indicating a user error
36
-
2.**System** - Indicating a system error
37
-
3.**Ambiguous** - Could be either user or system error
38
-
4.**Unknown** - No classification yet, most probably because the error type isn't included in the model
34
+
-**User** - Indicating a user error
35
+
-**System** - Indicating a system error
36
+
-**Ambiguous** - Could be either user or system error
37
+
-**Unknown** - No classification yet, most probably because the error type isn't included in the model
39
38
40
39
## Error code examples for each classification type
41
40
42
41
### Spark_User_TypeError_TypeNotIterable
43
42
44
43
In Python, the error `TypeError: argument of type 'insert type' is not iterable` occurs when the membership operator (in, not in) is used to validate the membership of a value in non iterable objects such as list, tuple, dictionary. This is usually due to the search of value in a non-iterable object. Possible solutions:
45
44
46
-
* Check if the value is present in the iterable object.
47
-
* If you want to check one value to another, use logical operator instead of Membership Operator.
48
-
* If the membership operator contains "None" value, it won't be able to iterate, and a null check or assigned default must be done.
49
-
* Check if the type of the value used can actually be checked and the typing is correct.
45
+
- Check if the value is present in the iterable object.
46
+
- If you want to check one value to another, use logical operator instead of Membership Operator.
47
+
- If the membership operator contains "None" value, it won't be able to iterate, and a null check or assigned default must be done.
48
+
- Check if the type of the value used can actually be checked and the typing is correct.
50
49
51
50
### Spark_System_ABFS_OperationFailed
52
51
53
-
An operation with ADLS Gen2 has failed.
52
+
An operation with Azure Data Lake Storage (ADLS) Gen2 has failed.
54
53
55
54
This error occurs typically due to a permissions issue.
56
55
@@ -59,22 +58,18 @@ Check the logs for this Spark application. Navigate to your Synapse Studio, sele
59
58
60
59
### Spark_Ambiguous_ClassLoader_NoClassDefFound
61
60
62
-
A class required by the code could not be found when the script was run.
63
-
64
-
Please refer to the following pages for package management documentation:
61
+
A class required by the code couldn't be found when the script was run. For more information, see:
65
62
66
-
For Notebook scenarios: [Apache Spark manage packages for interactive jobs](./apache-spark-manage-scala-packages.md)
63
+
- For Notebook scenarios: [Apache Spark manage packages for interactive jobs](./apache-spark-manage-scala-packages.md)
64
+
- For Spark batch scenarios (see section 6): [Apache Spark manage packages for batch jobs](./apache-spark-job-definitions.md#create-an-apache-spark-job-definition-for-apache-sparkscala)
67
65
68
-
For Spark batch scenarios (see section 6): [Apache Spark manage packages for batch jobs](./apache-spark-job-definitions.md#create-an-apache-spark-job-definition-for-apache-sparkscala)
69
-
70
-
Ensure that all the code dependencies are included in the JARs Synapse runs. If you do not or cannot include third party JARs with your own code, ensure that all dependencies are included in the workspace packages for the Spark pool you are executing code on, or they are included in the "Reference files" listing for the Spark batch submission. See the above documentation for more information.
66
+
Ensure that all the code dependencies are included in the JARs Synapse runs. If you do not or cannot include third party JARs with your own code, ensure that all dependencies are included in the workspace packages for the Spark pool you are executing code on, or they are included in the "Reference files" listing for the Spark batch submission.
71
67
72
68
### Spark_Unknown_Unknown_java.lang.Exception
73
69
74
70
An unknown failure, the model wasn't able to classify.
75
71
76
-
77
-
The error codes (including and beyond the list shown above) along with the troubleshooting instructions on how to resolve the issue will show up on the Synapse Studio application error pane if this feature is enabled.
72
+
The error codes (including and beyond the previous list) along with the troubleshooting instructions on how to resolve the issue will show up on the Synapse Studio application error pane if this feature is enabled.
78
73
79
74
> [!NOTE]
80
-
> If you built any tooling around the Synapse monitoring job that checks for a failing job by filtering the `LIVY_JOB_STATE_DEAD` error code, your app would no longer work. Because the returned error codes would be different as mentioned above. Modify any scripts accordingly in order to utilize this feature or disable the feature if it's not needed.
75
+
> If you built any tooling around the Synapse monitoring job that checks for a failing job by filtering the `LIVY_JOB_STATE_DEAD` error code, your app would no longer work. Because the returned error codes are different. Modify any scripts accordingly in order to utilize this feature or disable the feature if it's not needed.
Copy file name to clipboardExpand all lines: articles/synapse-analytics/sql/resources-self-help-sql-on-demand.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article contains information that can help you troubleshoot pr
4
4
author: azaricstefan
5
5
ms.author: stefanazaric
6
6
ms.reviewer: whhender, wiassaf
7
-
ms.topic: overview
7
+
ms.topic: troubleshooting-known-issue
8
8
ms.service: azure-synapse-analytics
9
9
ms.subservice: sql
10
10
ms.date: 09/26/2024
@@ -992,7 +992,7 @@ This is a public preview limitation. Drop and re-create the Delta table in Spark
992
992
993
993
### Query timeout or performance degradation on a table
994
994
995
-
When the original table in Spark or Dataverse is modified, the corresponding tables in the serverless pool is automatically recreated. This process results in the loss of existing statistics on the table. Without these statistics, queries on the table may experience delays or even timeouts.
995
+
When the original table in Spark or Dataverse is modified, the corresponding tables in the serverless pool are automatically recreated. This process results in the loss of existing statistics on the table. Without these statistics, queries on the table may experience delays or even timeouts.
996
996
997
997
If you encounter this issue, consider setting up a job to recreate statistics on the tables after changes in Spark/Dataverse or on a regular schedule.
0 commit comments