Sitemap

Member-only story

“Why My Spring Batch Job Was Perfect — Until It Ran on Production”

2 min readMay 31, 2025

--

💡 Angle:

Instead of a dry tutorial, this article tells a story — a tale of a developer deploying a batch job that worked in dev, CI/CD… but misbehaved in prod. Then we break down what went wrong, why it happens, and how to fix it — with side-by-side comparisons to what Spark or Airflow would do in that situation.

Friend Link ➡️ https://anupamhaldkar.medium.com/why-my-spring-batch-job-was-perfect-until-it-ran-on-production-f62f5225ae6e?sk=bc467f1a32797bf08f0508ba617fea9b

🧠 Structure:

1. The Setup

“Everything was working locally.”

Introduce the use case: ETL job using Spring Batch. Define chunks, readers, processors, writers — the usual suspects.

2. The Twist in Production

“The job took 3 hours instead of 15 mins.”

Introduce real-world problems:

  • DB locking
  • Skipping misconfigured rows
  • Faulty parallel execution
  • Out-of-memory errors

3. What We Thought vs. Reality

Compare theory with production truths:

What We Thought ➡️Chunked reading = fast

--

--

Anupam Haldkar
Anupam Haldkar

Written by Anupam Haldkar

Spreading Assist Tech Shaper 🤝 Software Engineer 🧑‍💻| Tech Dev ⚙️

No responses yet