CodeIgniter Forums
(HY000/1040): Too many connections - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: (HY000/1040): Too many connections (/thread-72649.html)



(HY000/1040): Too many connections - kvanaraj - 01-18-2019

A PHP Error was encountered
Severity: Warning
Message: mysqli::real_connect(): (HY000/1040): Too many connections
Filename: mysqli/mysqli_driver.php

File: /var/www/html/*******/application/controllers/User.php

Line: 19
Function: __construct


RE: (HY000/1040): Too many connections - InsiteFX - 01-18-2019

Is pconnect turned on in you database config?


RE: (HY000/1040): Too many connections - kvanaraj - 01-19-2019

(01-18-2019, 04:45 AM)InsiteFX Wrote: Id pconnect turned on in you database config?

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '*******',
'database' => '******',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);


RE: (HY000/1040): Too many connections - InsiteFX - 01-19-2019

Then the only other thing that might help is to get the server admin to raise the number of connections.