Switch language한국어
Back to the list

How I Stopped Node.js from Freezing While Bulk-Processing 1,500+ Excel Rows

TL;DR AI

Key summary

2 min read
  1. A Node.js Excel bulk import was optimized after 1,500 student rows overwhelmed the app in a single sequential loop.

  2. The original flow mixed bcrypt hashing, Postgres writes, and SMTP emails inline, causing timeouts and connection pressure.

  3. The fix kept database writes inside one transaction with per-row SAVEPOINTs for partial rollback.

  4. Email jobs were collected during import and sent only after the transaction finished, separating slow external work from DB transactions.

Read the original