CodeIgniter Forums
number of mysql connection is increasing rapidly at some sudden times in CI framework - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: number of mysql connection is increasing rapidly at some sudden times in CI framework (/showthread.php?tid=70423)



number of mysql connection is increasing rapidly at some sudden times in CI framework - mousumi - 04-07-2018

I am using PDO connection , following in my database connection in Codeigniter:
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn'    => 'hostname;dbname=dbname;username=user;password=password',
'hostname' => 'hostname',
'username' => 'user',
'password' => 'password',
'database' => 'dbname',
'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
);

I have also checked slow query logs, where i am geeting query like : SELECT GET_LOCK('a7642ffa05034f140c3fc90be7efd272828a600a', 300) AS ci_session_lock;


RE: number of mysql connection is increasing rapidly at some sudden times in CI framework - mama - 05-28-2018

We're seeing the same thing. Anybody any ideas as to why this happens?