Overview
A Boomi Atom has one JVM heap shared by every process execution on it. Maps that read a whole XML or JSON document into memory are fine on a normal day and fatal when the file is ten times larger and four other schedules start at the same minute.
Challenge
Month-end order files grew from tens of megabytes to several hundred. The nightly ERP-to-warehouse process mapped each file as a single document, and three other schedules started at the same time. The Atom ran out of heap partway through, restarted, and on restart some documents were reprocessed, so the warehouse received duplicate orders that finance then had to reverse by hand.
Environment
One local Atom on a Linux VM with an 8 GB heap, about 140 deployed processes, an ERP and a warehouse system on either side, and a PostgreSQL staging database.
Approach
AceMQ replayed a month-end file on a test Atom with heap and thread monitoring to see which shapes held the document in memory, and found two maps and a Set Properties step that did. The processes were reworked to split large files into record-sized documents, schedules were staggered, and heap was raised only after the demand had been reduced. AceMQ does not operate the Boomi platform; this work is on the customer's processes and Atom configuration.
Solution
- Replayed a month-end file with heap and thread monitoring to find where the full document was held
- Split large files into record-sized documents with a Data Process shape before the maps
- Set batch sizes on the staging database connector so writes no longer built one huge document
- Limited parallel threads with Flow Control on the heaviest process
- Staggered the four month-end schedules so they no longer started together
- Added an idempotency check on order number so a restart cannot send an order twice
- Set a heap alert at 75 percent and wrote a restart runbook for the operations team
Outcome
Month-end runs now finish without an Atom restart, and the largest file processes in bounded memory on the same VM. Duplicate orders stopped reaching the warehouse, and the operations team has a runbook for the heap alert.