Duplicate session id error in database table |
Hello!
We're using 3.1.5 with database sessions and we noticed that we would sometimes get the following error in the application logs: Quote:ERROR - 2017-07-22 15:32:19 --> Query error: Duplicate entry '[session_id]' for key 'PRIMARY' - Invalid query: INSERT INTO `db_session` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('[session_id]', ...) The system is deployed on a Linode server with CloudFlare enabled. There also doesn't seem to be any recognizable pattern--it just happens randomly. This is from our config.php: PHP Code: $config['sess_driver'] = 'database'; And our MySQL database table: Code: CREATE TABLE IF NOT EXISTS `db_session` ( We found posts suggesting the ip_address should also be a primary key, but this doesn't apply to us since we have sess_match_ip set to FALSE. Any help would be appreciated. Thanks! |
Messages In This Thread |
Duplicate session id error in database table - by parasabayan - 07-22-2017, 02:59 AM
RE: Duplicate session id error in database table - by natanfelles - 07-22-2017, 08:27 AM
RE: Duplicate session id error in database table - by parasabayan - 07-22-2017, 08:46 AM
RE: Duplicate session id error in database table - by parasabayan - 07-22-2017, 11:12 AM
RE: Duplicate session id error in database table - by natanfelles - 07-22-2017, 11:58 AM
RE: Duplicate session id error in database table - by parasabayan - 07-23-2017, 03:38 AM
RE: Duplicate session id error in database table - by Narf - 07-24-2017, 12:21 AM
RE: Duplicate session id error in database table - by parasabayan - 07-25-2017, 08:46 PM
|