Failing jobs or executors removed
Failed jobs and removed executors both cost time. When an executor is removed, Spark reruns its unfinished tasks. When a Spark job fails, the query or task that runs the job also fails. Use this page to find out why jobs fail or executors are removed, and to decide whether the behavior is expected or a problem to fix.
Use this page when the jobs timeline shows failed jobs or removed executors, for example:

If the timeline doesn't show failed jobs or removed executors, review the jobs timeline for other patterns and use the other pages in this guide to diagnose the issue. See Diagnose cost and performance issues using the Spark UI.
The most common reasons for executors being removed are:
- Autoscaling: In this case it's expected and not an error. See Enable autoscaling.
- Spot instance losses: The cloud provider is reclaiming your VMs. See Losing spot instances.
- Executors running out of memory: See Spark memory issues.
Failing jobs
If you see any failing jobs, click them to open their pages. Then scroll down to see the failed stage and a failure reason:

You may get a generic error. Click the link in the description to see more details:

If you scroll down on this page, you see why each task failed. In this case a memory issue appears to be the cause:

Failing executors
To find out why your executors are failing, first check the compute's Event log to see whether there's an explanation for the executor failures. For example, if you're using spot instances, the cloud provider may be reclaiming them.

Look for events explaining the loss of executors. For example, you may see messages indicating that the cluster is resizing or spot instances are being lost.
- If you are using spot instances, see Losing spot instances.
- If your compute was resized with autoscaling, it's expected and not an error. See Enable autoscaling.
If you don't see any information in the event log, go back to the Spark UI and click the Executors tab:

Here you can get the logs from the failed executors:

Next step
If you've gotten this far, the likeliest explanation is a memory issue. The next step is to dig into memory issues. See Spark memory issues.