BOM synchronization fails between ERP and material management

We’re experiencing consistent failures when synchronizing large BOM structures from our ERP system to Aveva MES material management module (AM 2021.2). The integration uses REST API calls, but we’re hitting 413 Payload Too Large errors for BOMs with more than 150 components.

Our current REST API buffer configuration appears inadequate for complex assemblies. The API gateway timeout is set to 30 seconds, and we suspect the chunking strategy needs optimization. Material planning is completely blocked as parent-child relationships aren’t establishing correctly.


POST /api/v1/material/bom HTTP/1.1
Content-Length: 2847361
Error 413: Request Entity Too Large
gateway_timeout: 30000ms

Has anyone dealt with similar payload size limitations in material management integrations? We need guidance on proper buffer sizing and whether middleware tuning could help distribute the load.

For nginx, you need to adjust these directives in your config: client_max_body_size (set to 20m minimum), client_body_buffer_size (256k), and proxy_read_timeout (increase to 120s). But honestly, chunking is still the better long-term solution. The key is using a transaction envelope pattern where you create a BOM import session first, then populate it with chunked data, and finally commit the session atomically.

We implemented chunking last year for a similar scenario. One critical aspect - implement idempotency keys in your API calls to prevent duplicate components if you need to retry failed chunks. Also consider implementing a staging table pattern in your middleware where you accumulate the BOM data before pushing to MES. This gives you better error recovery and validation capabilities before committing to the production material management database.

I’ve seen this exact issue before. The 413 error is typically a gateway/proxy limitation rather than MES itself. Your 30-second timeout is also too aggressive for large BOMs. First step - check your API gateway’s request size limit (usually nginx or IIS). You’ll need to increase max request body size to at least 10MB for complex BOMs.