I am using Moodle 2.8.5+ on a Windows 2012 server with IIS, PHP 5.5.11, and MySQL 5.6.17. I have started seeing the below error in my error logs and I am confused because this tells me that sessions are being stored in the database, but I do not have use db sessions selected in Admin>Session Handling. Any ideas on what would be causing these errors?
[14-May-2015 10:00:40 America/Denver] Default exception handler: Error writing to database Debug: Duplicate entry 'osbn4d1bqttcmvk01tg5qa4lh3' for key 'mdl_sess_sid_uix'
INSERT INTO mdl_sessions (state,sid,sessdata,userid,timemodified,timecreated,lastip,firstip) VALUES(?,?,?,?,?,?,?,?)
[array (
0 => 0,
1 => 'osbn4d1bqttcmvk01tg5qa4lh3',
2 => NULL,
3 => 0,
4 => 1431619240,
5 => 1431619240,
6 => '10.65.0.84',
7 => '10.65.0.84',
)]
Error code: dmlwriteexception
* line 446 of \lib\dml\moodle_database.php: dml_write_exception thrown
* line 1164 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1210 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 422 of \lib\classes\session\manager.php: call to mysqli_native_moodle_database->insert_record()
* line 399 of \lib\classes\session\manager.php: call to core\session\manager::add_session_record()
* line 79 of \lib\classes\session\manager.php: call to core\session\manager::initialise_user_session()
* line 773 of \lib\setup.php: call to core\session\manager::start()
* line 550 of \config.php: call to require_once()
* line 30 of \draftfile.php: call to require_once()
Scott