Troubleshooting
Spark Troubleshooting
Engine-side failures: out-of-memory jobs, missing connectors, runs that look stuck, and logs that seem empty. Start with the stages and logs - they name the failing stage - then use the table below.
At a glance
- Logs first - the stage
failureReasonnames what failed; the driver stderr carries the message. - Most causes are sizing or data - OOM and stuck runs trace back to
execution.settingsor the input. - Status lags ~30s - runs reconcile on a 30-second interval, so a
RUNNINGrun may already be done.
Logs first
Code
- While a run is
RUNNING, poll every 3-5 seconds with atail; when it reaches a terminal status, fetch the final logs once stream=stderrfor errors;grep=to filter- In
object/singlemodes, archived logs are read first (final, then live snapshots), so logs survive container restarts. Insharedmode, live logs come through the Spark Master UI proxy - if a worker restarted, the proxy may have nothing to show: use the history server
Status can lag reality by up to ~30 seconds (the reconciliation interval) - a run that looks RUNNING may already be done, and vice versa.
Common engine problems
| Symptom | Cause / fix |
|---|---|
Job dies with OutOfMemoryError | Raise executor_memory / executor_memory_overhead (or driver ones) in execution.settings - see Execution Settings |
ClassNotFoundException for a provider | The connector jar is missing from data/libs/connectors/ - add it, restart the app; the next run picks it up |
| Sources read 0 rows, run is a no-op | Asset read 0 rows with no declared schema: - declare the schema or check the data exists |
| Task failures, retries exhausted | task_max_retries (min 3) handles worker-loss retries; repeated failures point at the data or the spec - check the stage failureReason |
Run stuck RUNNING (batch) | Give it the 30s reconciliation; if genuinely stuck, kill it (ends CANCELLED) and re-run |
Run stuck RUNNING (stream) | Streaming runs stay alive by design - kill to stop, and it resumes from its checkpoint on the next start |
| Streaming pipeline not progressing | Check the trigger (trigger_interval on outputs, max_offsets_per_trigger on assets) and the driver logs for source errors |
| Output files look wrong or empty | Check the stage status and row counts in the run's stages - if a build was skipped, its input frame was empty |
| Arabic or other non-ASCII paths fail | Containers run with a UTF-8 locale - check that file names survive upload (GET the file list through the API) |
Driver logs empty in shared mode | The Spark proxy loses logs when a worker restarts - use the history server (event logs are on) |
Where to look
| Surface | URL | What it shows |
|---|---|---|
| Spark Master UI | http://localhost:8085 | Running apps, workers, job drill-down |
| Spark Worker UIs | http://localhost:8086 / :8087 | Per-worker executors and logs |
| Spark History Server | http://localhost:18080 | Completed runs (event logs) |
| Cluster resources | GET /api/cluster/resources | Total/available cores and memory |
| App debug port | localhost:5005 (JDWP) | Debugger attach point |
Before sizing a pipeline's execution.settings, check what the cluster actually has free with the cluster-resources endpoint.
Related pages
- Execution Settings - sizing runs
- Execution Lifecycle - statuses and kill behavior
- Common Errors - API-side errors
- Deployment - health checks and operations
Last modified on