Roundcube Community Forum

Release Support => Pending Issues => Topic started by: floeff on January 08, 2009, 07:18:06 AM

Title: MDB2 Error: constraint violation
Post by: floeff on January 08, 2009, 07:18:06 AM
Hello,

I run RoundCube 0.2-stable on a Dovecot IMAP server, and every now and then I receive errors like these:

Code: [Select]
[07-Jan-2009 12:51:32 +0100] DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last exec
uted query: EXECUTE mdb2_statement_mysql_528670db03153d30e9e7a0ce2f9c5d458226c0344 USING @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10] [Native co
de: 1062] [Native message: Doppelter Eintrag '29-INBOX.msg-57' f<FC>r Schl<FC>ssel 2]  in /var/www/roundcube/program/include/rcube_mdb2.php on l
ine 540 (GET /roundcube/?_task=mail&_action=get&_uid=57&_mbox=INBOX&_part=1.2.2)

[08-Jan-2009 09:51:48 +0100] DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last exec
uted query: EXECUTE mdb2_statement_mysql_538877e25f0655975d9c587963411154925db5ade USING @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10] [Native co
de: 1062] [Native message: Doppelter Eintrag '17-INBOX.msg-2' f<FC>r Schl<FC>ssel 2]  in /var/www/roundcube/program/include/rcube_mdb2.php on li
ne 540 (GET /roundcube/?_task=mail&_action=get&_uid=2&_mbox=INBOX&_part=1.2.2)


Anyone knows what the problem might be?

Thanks!
floeff
Title: MDB2 Error: constraint violation
Post by: eagle1 on January 12, 2009, 08:18:00 AM
The same here on Debian with Courier-IMAP....

Any hints?
Title: MDB2 Error: constraint violation
Post by: JohnDoh on January 12, 2009, 09:34:25 AM
do you have caching enabled? it looks like one of your messages has something in the headers which is breaking the SQL statement. I suggest if you can find which message it is then open a ticket on trac and attach the message for the devs to look at.
Title: MDB2 Error: constraint violation
Post by: floeff on January 12, 2009, 10:52:47 AM
Hi John,

thanks for your reply. Do you mean the configuration directive

$rcmail_config['enable_caching'] = TRUE;

?

floeff
Title: MDB2 Error: constraint violation
Post by: JohnDoh on January 12, 2009, 10:55:13 AM
thats the one
Title: MDB2 Error: constraint violation
Post by: floeff on January 12, 2009, 01:04:31 PM
Thanks! I will monitor it and try it out. I guess it's not a single message causing the issue, given the frequency the error occurs.
Title: MDB2 Error: constraint violation
Post by: eagle1 on January 14, 2009, 07:51:47 AM
I've turned off the CACHE feature, now the errors goes away.

It's possible that is an issue caused by upgrading from older version?

I see this after the MDB2 error: [Native message: Duplicate entry 'INBOX.msg-256' for key 2]
Title: MDB2 Error: constraint violation
Post by: floeff on January 14, 2009, 08:37:35 AM
Quote from: eagle1;16358
I've turned off the CACHE feature, now the errors goes away.

It's possible that is an issue caused by upgrading from older version?


I upgraded from 0.2-trunk (beta) to 0.2-stable. Database scheme had the same version, but maybe the beta made some faulty entries. Can I simply empty the cache table, or is this a risk?

Florian
Title: MDB2 Error: constraint violation
Post by: d00s7w on August 03, 2011, 12:21:26 PM
i have the same issue but i have enable_cache = false.


[03-Aug-2011 17:06:55 +0100]: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('92114e1b1fd0efe3b6f847872a1c5261', 'bGFuZ3VhZ2V8czo1OiJlbl9HQiI7YXV0aF90aW1lfGk6MTMxMjM4NzYxNTt0ZW1wfGI6MTs=', '82.30.37.166', FROM_UNIXTIME(1312387615), FROM_UNIXTIME(1312387615))] [Native code: 1062] [Native message: Duplicate entry '92114e1b1fd0efe3b6f847872a1c5261' for key 'PRIMARY']  in C:\Inetwww\webmail\program\include\rcube_mdb2.php on line 650 (GET /?_task=mail&_remote=1&_action=list&_mbox=INBOX&_refresh=1&_=1312387611986&_unlock=loading1312387611984)
Title: MDB2 Error: constraint violation
Post by: d00s7w on August 03, 2011, 12:22:47 PM
i have the same issue but i have enable_cache = false.


[03-Aug-2011 17:06:55 +0100]: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('92114e1b1fd0efe3b6f847872a1c5261', 'bGFuZ3VhZ2V8czo1OiJlbl9HQiI7YXV0aF90aW1lfGk6MTMxMjM4NzYxNTt0ZW1wfGI6MTs=', '82.30.37.166', FROM_UNIXTIME(1312387615), FROM_UNIXTIME(1312387615))] [Native code: 1062] [Native message: Duplicate entry '92114e1b1fd0efe3b6f847872a1c5261' for key 'PRIMARY']  in C:\Inetwww\webmail\program\include\rcube_mdb2.php on line 650 (GET /?_task=mail&_remote=1&_action=list&_mbox=INBOX&_refresh=1&_=1312387611986&_unlock=loading1312387611984)