I’m trying to synchronize databases on two hosts, and am running into lock related errors. I changed the lock setting from 1 to 2 to 3 to try to resolve the issue, and although there are fewer errors, there are a couple I can’t resolve. My command is:
pt-table-sync --execute --verbose --user=un --password=pw --databases=asterisk --lock=3 --buffer-in-mysql h=otherhost h=localhost
and the errors (underlined in the excerpt) are:
[B][COLOR=#FF0000]# 0 0 0 0 Nibble 20:39:38 20:39:38 0 asterisk.sip
0 0 0 0 Nibble 20:39:38 20:39:38 0 asterisk.sipsettings
Can’t execute the query because you have a conflicting read lock [for Statement “INSERT INTO asterisk
.smartscreen
(refnum
, number_start
, number_end
, display_name
, action
, created
) VALUES (‘799’, ‘15196672050’, ‘15196672050’, ‘Some FAX’, ‘R’, ‘2006-10-24 00:47:06’) /percona-toolkit src_db:asterisk src_tbl:smartscreen src_dsn:P=3306,h=otherhost,p=…,u=un dst_db:asterisk dst_tbl:smartscreen dst_dsn:P=3306,h=localhost,p=…,u=un lock:3 transaction:0 changing_src:0 replicate:0 bidirectional:0 pid:23085 user:root host:myhost/”] at line 10709 while doing asterisk.smartscreen on localhost
0 0 0 0 0 20:39:38 20:39:38 1 asterisk.smartscreen
0 0 0 0 Chunk 20:39:38 20:39:38 0 asterisk.sng_mcu_details
0 0 0 0 Chunk 20:39:39 20:39:39 0 asterisk.xmpp_users
Failed to unlock server: I need a src argument at /mnt/lserver2/data/development/haast/bin/debug/library/pt-table-sync line 6105.[/B]
Can anyone explain the cause, and how to resolve this? (This is a unidirectional sync, from remote to local host). There is very little, if any, traffic on the databases at this time. So I don’t think an app is writing to/reading from the DB…I even restarted the mysql service but the errors remain.