简体   繁体   English

Azure应用程序网关返回随机502错误

[英]Azure application gateway returning random 502 error

We have a setup as follow on Azure 我们在Azure上进行如下设置

The problem we have been encountering is that AG is reporting 502 errors on IP1 randomly. 我们一直遇到的问题是,AG正在IP 1上随机报告502错误。 In a day it could get about 20 502 errors on some random files. 一天之内,在某些随机文件上可能会出现约20502个错误。 However, these files on IP1's IIS log also shows success in returning data. 但是,IP1的IIS日志上的这些文件也显示成功返回数据。

IP2 doesn't have this issue at all. IP2根本没有这个问题。

We've tried to cross check the date/time from AG hitting 502 and comparing to IP1's IIS log to find the corresponding request but could not find any. 我们试图交叉检查AG到达502的日期/时间,并与IP1的IIS日志进行比较,以找到相应的请求,但找不到任何请求。 Assumption here is that if the request reached IP1 it would have created an entry in IIS log. 这里的假设是,如果请求达到IP1,它将在IIS日志中创建一个条目。

Because the 502 errors are random, and reported only by AG we are not able to lock down the root cause. 由于502错误是随机的,并且仅由AG报告,因此我们无法锁定根本原因。

Anyone have encountered such issue before or know how to troubleshoot such issue? 任何人以前都遇到过此类问题,或者知道如何解决此类问题?

you can try these out : 您可以尝试以下方法:

I understand that the backend Win VM's are running IIS and they are being load balanced by the Application Gateway. 我知道后端Win VM正在运行IIS,并且正在由应用程序网关进行负载平衡。 Random 502, 随机502,

  1. Check the HTTP timeout value; 检查HTTP超时值; ask the helpdesk team to check how long the request takes to be processed and sometimes if the processing time is > than set HTTP time out. 请服务台团队检查处理请求需要多长时间,有时检查处理时间是否大于设置的HTTP超时时间。 Random 502 is experienced. 随机502。

  2. Check backend health at the time of the issue; 发出问题时检查后端运行状况; If shows unhealthy - check the corresponding reason 如果显示不健康-检查相应原因

  3. Check the failed request count for the Application gateway backend pool during the time of the issue 在发布期间,检查应用程序网关后端池的失败请求计数

  4. Check usage, maybe the CPU might be shooting upwards of 90% - possible 检查使用情况,也许CPU的拍摄速度可能超过90%-可能

  5. Furthermore, you can check the IIS logs for HTTP error logs to check if the IIS is giving the error code 502. 此外,您可以检查IIS日志中的HTTP错误日志,以检查IIS是否给出错误代码502。

  6. If you have WAF enabled, ask the respective team to check the file size limit for upload and download with WAF on 如果您启用了WAF,请要求各自的团队检查使用WAF上载和下载的文件大小限制

I strongly think its a timeout on the backend Http settings that's causing this as it's intermittent and IIS shows all 200-399 status codes. 我强烈认为后端Http设置的超时是间歇性的,并且IIS显示所有200-399状态代码,因此超时。 Try increasing the timeout and test them. 尝试增加超时时间并进行测试。

I hope this helps :) 我希望这有帮助 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 逻辑应用程序 502 -“错误网关”错误 - Azure Logic App 502 - "Bad Gateway" error 上传大文件 - Azure App Service 上的 502 bad gateway 错误 - Upload large file - 502 bad gateway error on Azure App Service 无法解决 Azure 应用服务中的 (502) Bad Gateway 错误 - Unable to resolve (502) Bad Gateway error in Azure App Service 为什么会发生“(502) Bad Gateway”错误? - Why "(502) Bad Gateway" error happen? Azure CDN终结点通过502提供错误的网关 - Azure CDN endpoint giving 502 bad gateway with https 错误 - 403 禁止 - Microsoft-Azure-Application-Gateway/v2 - Error - 403 Forbidden - Microsoft-Azure-Application-Gateway/v2 调用Web服务返回远程服务器返回错误:(502)错误的网关 - Calling web service returns The remote server returned an error: (502) Bad Gateway 来自 .net C# 的 WebService 调用出现错误:(502) 网关错误 - WebService Call from .net C# getting error : (502) Bad Gateway 通过SSL卸载应用程序网关连接到Azure托管的ElasticSearch终结点 - Connect to an Azure hosted ElasticSearch endpoint through a SSL offloading Application Gateway GCM推送通知导致502 Bad Gateway - GCM push notifications cause 502 Bad Gateway
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM