Magento 502 Bad Gateway - Pdo/Abstract2020-04-01 php nginx magento-1.9 magento-1.8
I have a problem with mi magento installation. Magento is version 1.9 and today show me 502 Bad Gateway error. Yestarday all work great, i have recover the backup that i have and the result it's the same.
i think that it's not a nginx problem, cause if i add a index.html the website show me this page.
i dont'have nginx error.log, but when i flush the cache with this commend
php -r 'require "app/Mage.php"; Mage::app()->getCacheInstance()->flush();'
the system show me this error
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.
I have checked db data and all it's work. Anyone have any idea?
You are right. NGINX is just telling you there is Bad Gateway or better to say: Your backend isn't answering correctly.
php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution is because of some DNS resolver issues.
In case you are using an DNS Name to connect to your database, try to use the IP Address of the Host for now.
Can you resolve the Hostname of the DB-Instance. Try to resolve it using dig or nslookup.
dig A @ YOURDNSERVERSIP DBHOSTNAME.FQDN
- nginx 502 bad gateway
- PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known
- How to execute cron job properly with magento - exception Mage_Core_Exception with message Invalid model/method definition
- An error occurred while saving the customer , in magento 184.108.40.206
- 502 Gateway Errors under High Load (nginx/php-fpm)
- dbModel read resource does not implement Zend_Db_Adapter_Abstract on magento EE
- php-fpm + nginx + upload results in 502 Bad Request recv() failed()