502 Bad Gateway

Has anyone received a 502 Bad Gateway response from calling a POST REST service via an integration and if so what was the cause and how did you fix the issue?

We have an integration that calls an internal service to send emails from a corporate email account that can include attached documents. It works fine with an attachment of around 1.5MB but returns a 502 Bad Gateway response with an attachment of around 2.5MB. The service itself is tested with attachments up to 10MB. When we get the 502 Bad Gateway response there is no record of the request ever reaching the service endpoint (it's not in the service logs).

The response body shown in Appian is:

<html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> </body> </html>
The integration is using the Automatically Convert CDT to JSON option to convert the attached documents to Base64
Any advice or suggestions to help identify and/or fix the issue would be much appreciated.

  Discussion posts and replies are publicly visible