I have two webservers running Codeigniter framework and use a load balancer, and I want to store the shared session for both webservers instead of using sticky session from load balancer.
I tried to use ci database session. For few days the connections were excellent, until suddenly it start showing slow query like this:
SELECT GET_LOCK('59e30181bfafeae2d31394d621bab3cc4c401956', 300) AS ci_session_lock;
The query can take from 5 - 15 seconds which slow down the servers.
This is the session configuration in config.php
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0; //expire when the browser is closed
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
Does anyone ever experience like this? Thanks before.