Azure Logic Random Failures - 502 Web server received an invalid response while acting as a gateway or proxy server.

Bowling, Kyle 0 Reputation points
2023-08-25T14:47:08.3466667+00:00

Hello - I have a couple dozen Azure Logic Apps that are all triggered via HTTP request from another Azure Logic App within the same resource group. Throughout the day all of them will randomly fail in unison with the following error at the same time.

502 - Web server received an invalid response while acting as a gateway or proxy server.

There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

For example, all the logic apps will fail and return a 502 error at the same time multiple times throughout the day. The failed run will not show in run history because the Logic App is failing to be triggered. Is there anything I could to debug and fix this error or is this an issue on the Azure side?

After a minute or two the Azure Logic App performance will return to normal.

I have tried the Diagnose and Solve Problems blade on the Azure Logic Apps but this shows no problems.

This issue is also exclusive to Azure Logic Apps. We have several Azure Logic Apps that call Azure Functions throughout the day using the built-in Azure Functions connector with no issues.

Also, the issue is exclusive to the HTTP connector. Situations where we are calling an Azure Logic App from another Azure Logic with the built-in Logic App connector do not experience this issue.

Does anyone have any feedback on troubleshooting / resolving this issue?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MikeUrnun 9,777 Reputation points Moderator
    2023-09-07T23:01:43.02+00:00

    Hello @Bowling, Kyle - Thanks for reaching out and I apologize for the late reply. Resource groups are purely logical & meant to help organize the resources, as such, they don't have any impact on the performance & uptime of your Logic Apps.

    Based on your description, what I suspect might be happening, especially if you have 20+ apps with HTTP triggers calling each other in chained calls, is that there might be a bottleneck causing hanging requests across the chain of calls, ultimately causing all of them to fail. There may be multiple possibilities on why this may be occurring: faulty payload, timeouts, and other limits imposed by the service.

    Investigating the exact root cause might entail analyzing the (a) trigger history and (b) the logs through Azure Monitor. Note that Trigger History and Run History are separate, and you should be able to identify the specific trigger that may be bottlenecking by reviewing the Trigger History. If that doesn't help much, I would look to compose a Kusto query and run it through Azure Monitor for more specific error messages. If you need assistance with troubleshooting via Kusto queries, it's best to open a support case and work with one of our support engineers who has deeper insights into your unique environment in a 1:1 setting.

    In case your Azure Subscription doesn't carry a support plan, feel free to let me know in the comments section below and I'd be happy to help grant your subscription with a one-time free support enablement for resolving this particular issue. Ultimately, if the root cause is, indeed, a bottlenecking problem with one of the HTTP connectors, the solution might entail either making necessary changes that honor service limits for better resiliency or an architectural change in your overall chain of calls.

    I hope this helps, and I look forward to your reply. Thanks!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.