Magento 2 Error – User Already Has More Than ‘max_user_connections’

magento2sessionsql

Yesterday I get issue :

[2018-09-09 13:04:02] main.CRITICAL: SQLSTATE[HY000] [1203] User
user_database already has more than 'max_user_connections' active
connections {"exception":"[object] (Zend_Db_Adapter_Exception(code:
1203): SQLSTATE[HY000] [1203] User user_database already has more than
'max_user_connections' active connections at
/home/czasowe/domains/czasowewyprzedaze.pl/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144,
PDOException(code: 1203): SQLSTATE[HY000] [1203] User user_database
already has more than 'max_user_connections' active connections at
/home/czasowe/domains/czasowewyprzedaze.pl/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128)"}
[]

Anyone know how to solve this issue ?

Best Answer

Increase your mysql limits using max_connection value.

How to fix that:

  1. Open my.cnf
  2. Find max_connections value
  3. Set high value (100000 or more)
  4. Save file & reboot mysql.

You can check opened connection in MySQL using "SHOW PROCESSLIST" query. Sometimes PHP may running in infinite loop if something goes wrong and didn't close connection when it needed.

Related Topic