azure http错误404保持日志记录和wordpress数据库错误

时间:2017-03-27 03:31:18

标签: php wordpress azure

美好的一天!我们新近将我们的Wordpress网站迁移到Azure,它很成功,但当我打开详细错误& php错误登录门户网站,我发现很多错误日志都说明了http 404。 在阅读了很多论坛并应用他们的解决方案之后,错误仍然没有得到解决,还联系了Azure支持,而我们正在等待他们的行动,我正在寻求其他意见以寻求帮助,因为我们的网站遇到了一些停机时间,并在思考这些错误是相关的。

php_error.log说:

WordPress database error Lock wait timeout exceeded; try restarting transaction for query UPDATE
PHP Fatal error:  Cannot use object of type stdClass as array in D:\home\site\wwwroot\wp-content\plugins\floating-social-bar\class-floating-social-bar.php on line 687

Detailed Errors文件夹中的一个错误:

HTTP Error 404.0 - Not Found
    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
    Detailed Error Information:
    Module     FastCgiModule
    Notification     ExecuteRequestHandler
    Handler    PHP56_via_FastCGI
    Error Code     0x00000000
    Requested URL    https://ourdomain:80/index.php?url=apple-touch-icon.png
    Physical Path    D:\home\site\wwwroot\index.php
    Logon Method     Anonymous
    Logon User     Anonymous

我在web.config中尝试了这个,虽然有些错误不再显示但我认为它会爬到其他文件并继续抛出http错误。

<rule name="WordPress: https://ourdomain.com" stopProcessing="true">
  <match url="^(.*)$" ignoreCase="false" />
  <conditions logicalGrouping="MatchAll">
    <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/>
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/>
  </conditions>
  <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true"/>
</rule>

你知道如何解决这个问题吗?我该怎么办?

感谢你为此提供了很大的帮助。

非常感谢,

1 个答案:

答案 0 :(得分:0)

似乎您正在使用Azure应用服务 MySQL in-app ,正如您所提到的,“我们的网站遇到了一些停机时间”。 我想您没有为您的应用服务启用Always on

  

始终开启。默认情况下,如果Web应用程序闲置一段时间,则会将其卸载。这使系统可以节省资源。在“基本”或“标准”模式下,您可以启用“始终开启”以始终加载应用程序。如果您的应用运行连续的Web作业,则应启用Always On,否则Web作业可能无法可靠运行。

表格https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-configure

如果您在基本模式或标准模式下运行,则可以通过Azure portal启用它。

相关问题