1

When I run a script for upload products more than 5000. after 152 products upload showing below error. How can I upload thousand of products from csv without error?

Error: PHP Fatal error: Uncaught PDOException: SQLSTATE[08004] [1040] Too many connections in C:\xampp\htdocs\magento23\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php:128 Stack trace: C:\xampp\htdocs\magento23\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php(128): PDO->__construct('mysql:host=loca...', 'root', 'password', Array) C:\xampp\htdocs\magento23\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() C:\xampp\htdocs\magento23\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(406): Zend_Db_Adapter_Pdo_Mysql->_connect() C:\xampp\htdocs\magento23\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() C:\xampp\htdocs\magento23\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `store_w...', Array) C:\xampp\htdocs\magento23\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php in C:\xampp\htdocs\magento23\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php on line 144

  • Are you using a shared hosting? – Mohit Kumar Arora Feb 26 '19 at 6:55
  • It's run my localhost with cli command. – Anwar Feb 26 '19 at 6:58
  • Which Magento2 version you are using? – Amit Naraniwal Feb 26 '19 at 7:10
  • I am using Magento 2.3 – Anwar Feb 26 '19 at 7:15
0

Go to your mysql configuration file(/etc/my.cnf) and increase max_connections value like

e.x : max_connections = 500
| improve this answer | |
  • Yes, it's added max_connections = 500. but no yet resolved. – Anwar Feb 26 '19 at 6:59
0

You can check the link : https://stackoverflow.com/questions/24225164/sqlstatehy000-1040-too-many-connections

There are some solution given so it might help you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.