Java – MySQL InnoDB pending table level lock
•
Java
I have a large production network application (GlassFish 3.1 MySQL 5.5) All tables are InnoDB The application hangs completely every few days
example:
update user<br> set user.hasnewmessages = NAME_CONST('in_flag',_binary'\0' COLLATE 'binary') where user.id = NAME_CONST('in_uid',66381) insert into exchanges_itempacks set packid = NAME_CONST('in_packId',332149),type = NAME_CONST('in_type',1),itemid = NAME_CONST('in_itemId',23710872)
The query with the longest "time" is also waiting for table level lock Please help find out why MySQL tries to obtain level locks and can lock all these tables All articles about InnoDB lock indicate that if you do not enforce it, the engine will not use table locking
My my CNF has this:
innodb_flush_log_at_trx_commit = 0 innodb_support_xa = 0 innodb_locks_unsafe_for_binlog = 1 innodb_autoinc_lock_mode=2
Binary log is closed I have no "lock tables" or other explicit locking commands at all The transaction is read_ UNCOMMITED.
Show engine InnoDB status output: http://avatar-studio.ru:8080/ph/imonout.txt
Solution
Is your application still using msqldump to back up the database? This may lead to such behavior
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码