I'll try to be brief and to the point.
- I'm using Codeigniter 3.1.4. with HMVC
- Working perfectly on localhost with
'pconnect' = FALSE; - Problem at live server through shared hosting.
max_user_connections = 10. Set by the Hosting company.- Also added
mysql.allow_persistent = Offto php.ini file. - Gives the error
Message: mysqli::real_connect(): (42000/1203): User <user> already has more than 'max_user_connections' active connections Filename:mysqli/mysqli_driver.php Line Number: 201 Line 201is callingmysqli::real_connectwithin db_connect function of mysqli_driver- CI's official statement is "...CodeIgniter intelligently takes care of closing your database connections".
With pconnect = FALSE; and CI's "intelligent" closing of database connections, I don't see what should be causing the problem.
EDIT
- Was previously loading database groups through
$this->load->database('group', TRUE);in each model (only one such call per model). - Tried resolving above error through autoloading 'database' library and setting
$this->db->db_select('dbName');in respective controllers+models but it's not always selecting the correct database when controller+model is loaded. - Does anyone know how
db->db_select()works?
Any ideas would be great help. Thanks.