Skip to main content
InterviewHubPRO
Section Overview
Q26

Question 26 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

52%
Apache Spark Big Data (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

What causes the fatal "Shuffle Fetch Failed" exception and how do you resolve it?

senior LevelHTTP & REST APIs

In Simple Words: Occurs when a reducer executor attempts to fetch shuffle blocks from an upstream mapper executor that has crashed or timed out:

  • Causes:
    1. Mapper executor crashed due to an OutOfMemory error (GC pause > 120s).
    2. Node hardware failure or spot instance termination.
    3. Excessive network congestion.
  • Fixes:
    • Increase spark.core.connection.ack.wait.timeout (e.g. from 120s to 300s).
    • Increase spark.sql.shuffle.partitions from the default 200 to 1000+ to reduce per-partition block size.
    • Enable external shuffle service (spark.shuffle.service.enabled).