MySQL deadlock causes query resolution failure

Source: Internet
Author: User

MySQL deadlock causes query resolution. Recently, when the database is being maintained, the data cannot be stored into the database during data parsing. The reason is that MySQL transactions have deadlocked. I restarted MySQL several times before. Www.2cto.com has recently discovered frequent occurrences. So find a method. SELECT * FROM nation; trx_id trx_state trx_started then trx_wait_started trx_weight then trx_query trx_operation_state then trx_tables_locked trx_lock_structs too many then trx_isolation_level too many trx_ad Too many trx_state trx_started than trx_wait_started trx_weight trx_mysql_thread_id trx_query trx_operation_state limit trx_tables_locked trx_lock_structs limit trx_isolation_level limit trx_a Daptive_hash_latched trx_adaptive_hash_timeout www.2cto.com. Select sysdate (); AM and the start time of the transaction is AM. The display is abnormal. The thread ID (trx_mysql_thread_id) of the transaction ). Run the command: The kill thread ID database is fixed properly. View the transaction being locked SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS; view the transaction waiting for the lock SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.