首页 > 解决方案 > Azure 应用程序网关上的 504 网关超时导致 WordPress 插件更新错误

问题描述

我们的 WordPress 站点位于 Azure 应用程序网关 (WAF v2) 后面。当我们更新 WordPress 插件时,我们会收到以下错误:

Update failed: 504 Gateway Time-out 504 Gateway Time-out Microsoft-Azure-Application-Gateway/v2 
<!-- a padding to disable MSIE and Chrome friendly error page --> 
<!-- a padding to disable MSIE and Chrome friendly error page --> 
<!-- a padding to disable MSIE and Chrome friendly error page --> 
<!-- a padding to disable MSIE and Chrome friendly error page --> 
<!-- a padding to disable MSIE and Chrome friendly error page --> 
<!-- a padding to disable MSIE and Chrome friendly error page -->

查看 WAF 日志,使用以下查询,更新插件时没有活动。

AzureDiagnostics
| where ResourceType == "APPLICATIONGATEWAYS" and Category == "ApplicationGatewayFirewallLog" and action_s != "Allowed"
| project TimeGenerated, hostname_s, requestUri_s, clientIp_s, ruleSetType_s, ruleSetVersion_s, ruleId_s, action_s, Message, instanceId_s

我们已将时间设置Request time-out (seconds)为 60 秒,但这没有任何效果。综上所述,插件似乎确实可以安装、更新和正常工作。

我们能做些什么来防止这个错误吗?

标签: wordpressazureazure-application-gateway

解决方案


最后,我只是将Request time-out (seconds)时间增加到 120 秒。在此之后,我安装的每个插件都已正确安装且没有错误。

可以通过以下方式访问此设置:

  1. 应用防火墙。
  2. HTTP 设置。
  3. 您的 HTTP 设置。
  4. 请求超时(秒)。

推荐阅读