PDOException: SQLSTATE[HY000] [1040] Too many connections in /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128 Stack trace: #0 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(128): PDO->__construct() #1 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 /var/www/html/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(413): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() #4 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query() #5 /var/www/html/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(549): Zend_Db_Adapter_Pdo_Abstract->query() #6 /var/www/html/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(616): Magento\Framework\DB\Adapter\Pdo\Mysql->_query() #7 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql->query() #8 /var/www/html/magento2/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php(101): Zend_Db_Adapter_Abstract->fetchAll() #9 /var/www/html/magento2/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php(61): Magento\Store\App\Config\Source\RuntimeConfigSource->getEntities() #10 /var/www/html/magento2/lib/internal/Magento/Framework/App/Config/ConfigSourceAggregated.php(40): Magento\Store\App\Config\Source\RuntimeConfigSource->get() #11 /var/www/html/magento2/generated/code/Magento/Framework/App/Config/ConfigSourceAggregated/Proxy.php(95): Magento\Framework\App\Config\ConfigSourceAggregated->get() #12 /var/www/html/magento2/app/code/Magento/Store/App/Config/Type/Scopes.php(63): Magento\Framework\App\Config\ConfigSourceAggregated\Proxy->get() #13 /var/www/html/magento2/lib/internal/Magento/Framework/App/Config.php(132): Magento\Store\App\Config\Type\Scopes->get() #14 /var/www/html/magento2/app/code/Magento/Store/Model/StoreRepository.php(106): Magento\Framework\App\Config->get() #15 /var/www/html/magento2/app/code/Magento/Store/Model/StoreRepository.php(127): Magento\Store\Model\StoreRepository->getById() #16 /var/www/html/magento2/app/code/Magento/Store/Model/StoreResolver.php(181): Magento\Store\Model\StoreRepository->getActiveStoreById() #17 /var/www/html/magento2/app/code/Magento/Store/Model/StoreResolver.php(126): Magento\Store\Model\StoreResolver->getDefaultStoreById() #18 /var/www/html/magento2/app/code/Magento/Store/Model/StoreManager.php(160): Magento\Store\Model\StoreResolver->getCurrentStoreId() #19 /var/www/html/magento2/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento\Store\Model\StoreManager->getStore() #20 /var/www/html/magento2/app/code/Magento/Store/Model/Resolver/Store.php(30): Magento\Store\Model\StoreManagerInterface\Proxy->getStore() #21 /var/www/html/magento2/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Store->getScope() #22 /var/www/html/magento2/lib/internal/Magento/Framework/App/Config.php(69): Magento\Framework\App\Config\ScopeCodeResolver->resolve() #23 /var/www/html/magento2/generated/code/Magento/Framework/App/Config/Interceptor.php(24): Magento\Framework\App\Config->getValue() #24 /var/www/html/magento2/lib/internal/Magento/Framework/Session/Config.php(195): Magento\Framework\App\Config\Interceptor->getValue() #25 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Framework\Session\Config->__construct() #26 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() #27 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create() #28 /var/www/html/magento2/lib/internal/Magento/Framework/App/Response/Http.php(85): Magento\Framework\ObjectManager\ObjectManager->get() #29 /var/www/html/magento2/app/code/Magento/MediaStorage/Model/File/Storage/Response.php(47): Magento\Framework\App\Response\Http->__construct() #30 /var/www/html/magento2/generated/code/Magento/MediaStorage/Model/File/Storage/Response/Interceptor.php(14): Magento\MediaStorage\Model\File\Storage\Response->__construct() #31 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\MediaStorage\Model\File\Storage\Response\Interceptor->__construct() #32 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() #33 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create() #34 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get() #35 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create() #36 /var/www/html/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(235): Magento\Framework\ObjectManager\ObjectManager->create() #37 /var/www/html/magento2/pub/get.php(81): Magento\Framework\App\Bootstrap->createApplication() #38 {main} Next Zend_Db_Adapter_Exception: SQLSTATE[HY000] [1040] Too many connections in /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144 Stack trace: #0 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 /var/www/html/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(413): Zend_Db_Adapter_Pdo_Mysql->_connect() #2 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() #3 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query() #4 /var/www/html/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(549): Zend_Db_Adapter_Pdo_Abstract->query() #5 /var/www/html/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(616): Magento\Framework\DB\Adapter\Pdo\Mysql->_query() #6 /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql->query() #7 /var/www/html/magento2/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php(101): Zend_Db_Adapter_Abstract->fetchAll() #8 /var/www/html/magento2/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php(61): Magento\Store\App\Config\Source\RuntimeConfigSource->getEntities() #9 /var/www/html/magento2/lib/internal/Magento/Framework/App/Config/ConfigSourceAggregated.php(40): Magento\Store\App\Config\Source\RuntimeConfigSource->get() #10 /var/www/html/magento2/generated/code/Magento/Framework/App/Config/ConfigSourceAggregated/Proxy.php(95): Magento\Framework\App\Config\ConfigSourceAggregated->get() #11 /var/www/html/magento2/app/code/Magento/Store/App/Config/Type/Scopes.php(63): Magento\Framework\App\Config\ConfigSourceAggregated\Proxy->get() #12 /var/www/html/magento2/lib/internal/Magento/Framework/App/Config.php(132): Magento\Store\App\Config\Type\Scopes->get() #13 /var/www/html/magento2/app/code/Magento/Store/Model/StoreRepository.php(106): Magento\Framework\App\Config->get() #14 /var/www/html/magento2/app/code/Magento/Store/Model/StoreRepository.php(127): Magento\Store\Model\StoreRepository->getById() #15 /var/www/html/magento2/app/code/Magento/Store/Model/StoreResolver.php(181): Magento\Store\Model\StoreRepository->getActiveStoreById() #16 /var/www/html/magento2/app/code/Magento/Store/Model/StoreResolver.php(126): Magento\Store\Model\StoreResolver->getDefaultStoreById() #17 /var/www/html/magento2/app/code/Magento/Store/Model/StoreManager.php(160): Magento\Store\Model\StoreResolver->getCurrentStoreId() #18 /var/www/html/magento2/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento\Store\Model\StoreManager->getStore() #19 /var/www/html/magento2/app/code/Magento/Store/Model/Resolver/Store.php(30): Magento\Store\Model\StoreManagerInterface\Proxy->getStore() #20 /var/www/html/magento2/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Store->getScope() #21 /var/www/html/magento2/lib/internal/Magento/Framework/App/Config.php(69): Magento\Framework\App\Config\ScopeCodeResolver->resolve() #22 /var/www/html/magento2/generated/code/Magento/Framework/App/Config/Interceptor.php(24): Magento\Framework\App\Config->getValue() #23 /var/www/html/magento2/lib/internal/Magento/Framework/Session/Config.php(195): Magento\Framework\App\Config\Interceptor->getValue() #24 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Framework\Session\Config->__construct() #25 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() #26 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create() #27 /var/www/html/magento2/lib/internal/Magento/Framework/App/Response/Http.php(85): Magento\Framework\ObjectManager\ObjectManager->get() #28 /var/www/html/magento2/app/code/Magento/MediaStorage/Model/File/Storage/Response.php(47): Magento\Framework\App\Response\Http->__construct() #29 /var/www/html/magento2/generated/code/Magento/MediaStorage/Model/File/Storage/Response/Interceptor.php(14): Magento\MediaStorage\Model\File\Storage\Response->__construct() #30 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\MediaStorage\Model\File\Storage\Response\Interceptor->__construct() #31 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() #32 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create() #33 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get() #34 /var/www/html/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create() #35 /var/www/html/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(235): Magento\Framework\ObjectManager\ObjectManager->create() #36 /var/www/html/magento2/pub/get.php(81): Magento\Framework\App\Bootstrap->createApplication() #37 {main}