【问题标题】:Magento 502 Bad Gateway - Pdo/AbstractMagento 502 Bad Gateway - Pdo/Abstract
【发布时间】:2020-07-12 10:36:58
【问题描述】:

我在安装 mi magento 时遇到问题。 Magento 是 1.9 版,今天显示 502 Bad Gateway 错误。昨天一切正常,我已经恢复了我拥有的备份,结果是一样的。

我认为这不是 nginx 问题,因为如果我添加 index.html,网站会显示此页面。

我没有 nginx error.log,但是当我用这个推荐刷新缓存时php -r 'require "app/Mage.php"; Mage::app()->getCacheInstance()->flush();'

系统显示此错误PHP Fatal error: Uncaught PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /nxr/websitename/www/lib/Zend/Db/Adapter/Pdo/Abstract.php:128

我已经检查了 db 数据并且一切正常。有人知道吗?

【问题讨论】:

    标签: php nginx magento-1.9 magento-1.8


    【解决方案1】:

    你是对的。 NGINX 只是告诉你有错误的网关或更好的说法:你的后端没有正确回答。

    此错误php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution 是由于某些 DNS 解析器问题。

    如果您使用 DNS 名称连接到数据库,请暂时尝试使用主机的 IP 地址。

    您能否解析数据库实例的主机名。尝试使用 dig 或 nslookup 解决它。 dig A @ YOURDNSERVERSIP DBHOSTNAME.FQDN

    【讨论】:

      猜你喜欢
      • 2018-06-09
      • 1970-01-01
      • 2014-08-04
      • 2020-04-05
      • 2023-03-20
      • 2023-03-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多