My hoster wrote an automatic mail with MySQL queries taking very long to execute. One part of these queries are of the following kind:
# Query_time: 6.143837 Lock_time: 0.000060 Rows_sent: 0 Rows_examined: 0
use d40381;
SET timestamp=1388697646;
INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('duplicate_id', 1388697641, 'modx.user.contextTokens|a:0:{}');
While trying to run this query, I found out, that the key "duplicate_id" (i removed the actual hash for safety reasons) is already in the database:
#1062 - Duplicate entry 'duplicate_id' for key 'PRIMARY'
Why is MODX inserting this row instead of updating the available entry?