Hello,
I've got a flow that essentially scans incoming emails for attachments and sends off an email to another inbox with the attachment attached. Here is a screenshot of the part of the flow that I'm sometimes getting errors on:

I'm getting the below error on an extremely small number of flow runs. This flow runs 50-100 times a day and I'll usually get a similar error to this once every couple of days and I can't seem to figure out why. Resubmitting the flow run with the error results in the flow failing again.
{
"error": {
"code": 500,
"source": "flow-apim-msmanaged-na-westus2-01.azure-apim.net",
"clientRequestId": "6633fa92-30e7-40c6-a499-ef336c731e39",
"message": "BadGateway",
"innerError": {
"status": 500,
"message": "Unknown Error : {\r\n \"error\": {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Maximum request length exceeded.\",\r\n \"innerError\": {\r\n \"request-id\": \"354de573-4167-4edf-8add-fc0ebf55bc91\",\r\n \"date\": \"2019-07-29T15:55:09\"\r\n }\r\n }\r\n}\r\nclientRequestId: 6633fa92-30e7-40c6-a499-ef336c731e39\r\nserviceRequestId: 354de573-4167-4edf-8add-fc0ebf55bc91",
"source": "office365-eus2.azconn-eus2-01.p.azurewebsites.net"
}
}
}
Does anyone know what is going on here? I can't find anything that the failed runs have in common and often these errors have multiple attachments where all but one of the attachments flow through successfully, so it's not even the email itself.