Hi,
I use Dbmail since several months now and I really appreciate this piece
of work.
I noticed an issue with Dbmail 3.1.17. I have really often the following
error:
Sep 11 14:57:36 localhost dbmail/imap4d[16111]: Error:[db]
db_exec(+337): SQLException: Lock wait timeout exceeded; try restarting
transaction
Sep 11 14:57:36 localhost dbmail/imap4d[16111]: Error:[db]
db_exec(+338): failed query [UPDATE dbmail_messages SET status=2 WHERE
message_idnr=10381062 ]
This seems to be related to the IMAP clients calling EXPUNGE command.
I tried to find why those locks timeouts (50 seconds) and running SHOW
ENGINE INNODB STATUS gives:
---TRANSACTION 4D480C2A, ACTIVE 185 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 2 lock struct(s), heap size 1248, 1 row lock(s)
MySQL thread id 3861, OS thread handle 0x7fcad6f4f700, query id
114271171 192.168.201.66 dbmail Updating
UPDATE dbmail_messages SET status=2 WHERE message_idnr=11792731
------- TRX HAS BEEN WAITING 26 SEC FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 904 page no 69361 n bits 248 index `PRIMARY` of
table `dbmail`.`dbmail_messages` trx id 4D480C2A lock_mode X locks rec
but not gap waiti
ng
Record lock, heap no 17 PHYSICAL RECORD: n_fields 14; compact format;
info bits 0
0: len 8; hex 0000000000b3f15b; asc [;;
1: len 6; hex 00004d47a61b; asc MG ;;
2: len 7; hex 29000001dd10bc; asc ) ;;
3: len 8; hex 0000000000000298; asc ;;
4: len 8; hex 000000000043ef8e; asc C ;;
5: len 1; hex 81; asc ;;
6: len 1; hex 80; asc ;;
7: len 1; hex 81; asc ;;
8: len 1; hex 80; asc ;;
9: len 1; hex 80; asc ;;
10: len 1; hex 80; asc ;;
11: len 30; hex
323937613335393535363966326330366639323166356363653763336265; asc
297a3595569f2c06f921f5cce7c3be; (total 32 bytes);
12: len 1; hex 02; asc ;;
13: len 8; hex 8000000000000000; asc ;;
------------------
---TRANSACTION 4D47A61B, ACTIVE 367 sec
7 lock struct(s), heap size 1248, 164 row lock(s), undo log entries 164
MySQL thread id 3863, OS thread handle 0x7fcad7157700, query id
114811398 192.168.201.66 dbmail
The transactions seems quite long lived !
The first one (4D480C2A) is waiting for a LOCK to be granted and the
only other transaction running which has LOCKS is the second one
(4D47A61B) which never ends whith a number of LOCK growing endlessly and
never shrinking.
The only way to fix the situation is to restart Dbmai imapd daemon. But
the issue comes back quickly.
Any idea about what is happening there ?
Regards,
--
Yannis Aribaud
_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail