it
Spark Structured Streaming Troubleshooting
Spark Streaming Troubleshooting

Spark Structured Streaming Troubleshooting แก้ปัญหา OOM Checkpoint Watermark Performance Kafka State Store AQE Partition Skew
เนื้อหาเกี่ยวข้อง — อ่านต่อ: TypeScript Zod Architecture Design Pattern — คู่มือฉบับสมบูรณ์ 2026
| ปัญหา | สาเหตุ | วิธีแก้ | Priority |
|---|---|---|---|
| OOM (Out of Memory) | State Store ใหญ่ / Shuffle / Large Batch | Watermark + RocksDB + AQE | Critical |
| Slow Batch | Partition Skew / No AQE / Low Parallelism | เพิ่ม Partitions + AQE + Broadcast | High |
| Checkpoint Corrupt | Disk Full / Schema Change / Bug | ลบ Checkpoint + Idempotent Sink | High |
| Late Data Loss | Watermark ตัดข้อมูลเร็วเกินไป | เพิ่ม Watermark Duration | Medium |
| Data Duplication | Checkpoint Recovery / At-least-once | Idempotent Sink (Upsert) | Medium |
| Kafka Lag | Processing ช้ากว่า Ingestion | Scale Executors + maxOffsetsPerTrigger | High |

เคล็ดลับ
- Watermark: ตั้ง Watermark ทุก Stateful Query ป้องกัน State OOM
- RocksDB: ใช้ RocksDB State Store สำหรับ State ขนาดใหญ่
- AQE: เปิด Adaptive Query Execution ลด Skew อัตโนมัติ
- Idempotent: ใช้ Idempotent Sink (Upsert) ป้องกันข้อมูลซ้ำ
- Monitor: ดู Spark UI Batch Duration Processing Rate State Size
ปัญหาที่พบบ่อยมีอะไร
OOM State Store Partition Skew Slow Batch Checkpoint Corruption Late Data Kafka Offset Serialization Schema Evolution Backlog
แนะนำเพิ่มเติม — ดูสัญญาณเทรดที่ XM Signal
เนื้อหาเกี่ยวข้อง — แนะนำให้อ่าน Azure Front Door Metric Collection
เนื้อหาเกี่ยวข้อง — ดูเพิ่มเติมเรื่อง dbt Data Transform Cost Optimization ลดค่าใช้จ่าย — คู่มือฉบับสมบูรณ์ 2026





