CodeIgniter Forums
Uncaught exception 'PDOException' with message 'SQLSTATE[08004] [1040] Too many connections - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Uncaught exception 'PDOException' with message 'SQLSTATE[08004] [1040] Too many connections (/showthread.php?tid=61167)



Uncaught exception 'PDOException' with message 'SQLSTATE[08004] [1040] Too many connections - El Forum - 10-04-2014

[eluser]Unknown[/eluser]
Quote:Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[08004] [1040] Too many connections' in C:\xampp\htdocs\BALAY\system\database\drivers\pdo\pdo_driver.php:114 Stack trace: #0 C:\xampp\htdocs\BALAY\system\database\drivers\pdo\pdo_driver.php(114): PDO->__construct('mysql:host=127....', 'root', 'spectacular', Array) #1 C:\xampp\htdocs\BALAY\system\database\DB_driver.php(115): CI_DB_pdo_driver->db_pconnect() #2 C:\xampp\htdocs\BALAY\system\database\DB.php(148): CI_DB_driver->initialize() #3 C:\xampp\htdocs\BALAY\system\core\Loader.php(346): DB('', NULL) #4 C:\xampp\htdocs\BALAY\system\core\Loader.php(1171): CI_Loader->database() #5 C:\xampp\htdocs\BALAY\system\core\Loader.php(152): CI_Loader->_ci_autoloader() #6 C:\xampp\htdocs\BALAY\system\core\Controller.php(51): CI_Loader->initialize() #7 C:\xampp\htdocs\BALAY\application\controllers\balay_roomsmanager\amenities.php(7): CI_Controller->__construct() #8 C:\xampp\htdocs\BALAY\system\core\Loader.php(303): Amenities->__construct() #9 C:\xampp\htdocs\BALAY\app in C:\xampp\htdocs\BALAY\system\database\drivers\pdo\pdo_driver.php on line 114

can anyone help me how to fix this?
please


Uncaught exception 'PDOException' with message 'SQLSTATE[08004] [1040] Too many connections - El Forum - 10-04-2014

[eluser]rufnex[/eluser]
I think you have to set the mysql config var

max_connections=xxx

higher, than it's right know. look also at

https://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html


Uncaught exception 'PDOException' with message 'SQLSTATE[08004] [1040] Too many connections - El Forum - 10-05-2014

[eluser]ivantcholakov[/eluser]
If you need to fix this in urgent manner, try to use a non-persistent connection, within config/database.php set the option 'pconnect' to FALSE.