Suddenly my project starts saying there's too many connections to the database.
"my_mysql_user already has more than 'max_user_connections' active connections"
This always worked fine and I'm using multidatabase and the settings are
$config['hostname'] = 'localhost';
$config['username'] = 'my_mysql_user';
$config['password'] = 'my_mysql_password';
$config['database'] = ($db == null ? $this->CI->session->company['db'] : $db);
$config['dbdriver'] = 'mysqli';
$config['dbprefix'] = '';
$config['pconnect'] = FALSE;
$config['db_debug'] = FALSE;
$config['char_set'] = 'utf8';
$config['dbcollat'] = 'utf8_general_ci';
And I need to load like 20/30 models..and I always load them in the __construct()
of the controller.
Even thought it always worked, I thought I might change it and load the models only in the functions that are needed, and the problem persists.
By executing SHOW PROCESSLIST
it returns nothing, there's no query being done.
What can I do to track the problem? It seems the connections are not closed!