I get on several installations (including mines) tons of the following error log entries:
[15-May-2014 10:00:11 +0200]: DB Error: [1062] Duplicate entry '0l483tpe3t9nvuj9p7rb0cn8p0' for key 'PRIMARY' (SQL Query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('0l483tpe3t9nvuj9p7rb0cn8p0', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJpdF9JVCI7dGFza3xzOjU6ImxvZ2luIjtwbHVnaW5fbWFuYWdlcl9zZXR0aW5nc3xhOjEwOntzOjI3OiJwbHVnaW5fbW *** MASKED ***, '95.228.34.241', now(), now())) in /var/www/html/roundcubemail-1.0.1/program/lib/Roundcube/rcube_db.php on line 467 (GET /?_task=logout)
This is obviously related to rcube_session.php lines 230 ff. (Roundcube 1.0.1). Shouldn't Roundcube check there if an entry already exists? If so so, then there should be an UPDATE query instead of INSERT.
Possible fix:
{{{
else {
$result = $this->db->query("SELECT io FROM $table WHERE
sess_id = ? LIMIT 1", $key); if (is_array($this->db->fetch_assoc($result))) { $this->db->query("UPDATE $table SET vars = ?, ip = ?, changed = ? WHERE sess_id = ?", base64_encode($vars), (string)$this->ip, $now, $key); } else { $this->db->query("INSERT INTO $table (sess_id, vars, ip, created, changed)" . " VALUES (?, ?, ?, $now, $now)", $key, base64_encode($vars), (string)$this->ip); } }
}}}