mysql的線程處於System lock狀態下

來源:互聯網
上載者:User

標籤:default   5.7   disabled   any   lock   server   color   禁用   服務   

The thread has called mysql_lock_tables() and the thread state has not been updated since. This is a very general state that can occur for many reasons.For example, the thread is going to request or is waiting for an internal or external system lock for the table. This can occur when InnoDB waits for a 

table-level lock during execution of LOCK TABLES. If this state is being caused by requests for external locks and you are not using multiple mysqld servers
that are accessing the same MyISAM tables, you can disable external system locks with the --skip-external-locking option. However, external locking is
disabled by default, so it is likely that this option will have no effect. For SHOW PROFILE, this state means the thread is requesting the lock (not waiting
for it).

System lock

這個線程是被mysql_lock_tables()調用的。這種狀態可能是很多種原因造成的。

例如,一個線程想請求或者正在等一個表的內部或者外部的system lock;

        也可能是InnoDB在執行lock tables的時候,等表級鎖;

        也可能是請求內部鎖,比如訪問相同MyISM表沒有用多個mysqld服務;

遇到這種情況,可以用--skip-external-locking選項,禁用內部的system locks。然而,內部鎖如果預設禁用的話,那個選項就會沒用了。

如果是在show profile的時候遇到這種狀態,就說明這個線程正在請求鎖(不是等)。

來源:https://dev.mysql.com/doc/refman/5.7/en/general-thread-states.html 

mysql的線程處於System lock狀態下

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.