Data Action returning 504 Gateway Timeout on large JSON payloads in multi-org AppFoundry integration

Why does this setting max_execution_time appear to be ignored when our custom Data Action processes payloads exceeding 2MB within a Genesys Cloud Architect flow? Our AppFoundry integration, deployed across multiple partner organizations, recently started experiencing intermittent 504 Gateway Timeout errors during bulk contact updates. The endpoint /api/v2/architect/flows/{flowId} executes successfully for smaller batches, but fails consistently when the JSON body contains more than 500 contact objects. We are using the Node.js SDK v4.2.1 and the runtime environment is Node.js 18.x. The error occurs specifically when the Data Action attempts to write back to the Genesys Cloud API after processing logic completes, suggesting the timeout happens during the HTTP response phase rather than the execution phase. We have verified that the payload structure is valid and conforms to the schema defined in the AppFoundry manifest. The issue is reproducible in both Production and Development environments. We suspect this might be related to the default timeout limits imposed on Data Actions or potential rate limiting on the underlying API calls triggered by the action. Is there a known limitation on payload size for Data Actions that we are missing? Or is there a specific configuration in the AppFoundry deployment settings that allows for extended execution times for large data transfers? We need a reliable way to handle these bulk operations without triggering gateway timeouts, as this is impacting our client’s daily data synchronization processes. Any insights into optimizing the payload structure or adjusting timeout settings would be greatly appreciated.