日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

MySQL Aborted_clients和 Aborted_connects状态变量详解

發布時間:2023/12/15 综合教程 36 生活家
生活随笔 收集整理的這篇文章主要介紹了 MySQL Aborted_clients和 Aborted_connects状态变量详解 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Aborted_clients Aborted_connects狀態變量詳解

By:授客 QQ:1033553122

狀態變量定義

Aborted_clients

因客戶端消亡時未恰當的關閉連接而引起的被中斷連接數

The number of connections that were aborted because the client died without closing the connection properly.

Aborted_connects

連接MySQL服務器失敗的次數。

The number of failed attempts to connect to the MySQL server。

參考鏈接:

https://dev.mysql.com/doc/refman/5.5/en/server-status-variables.html

狀態變量數值分析

查看變量值

SHOW GLOBAL STATUS LIKE 'Aborted_connects'

SHOW GLOBAL STATUS LIKE 'Aborted_clients'

Aborted_connects

如果客戶端連接mysql服務器失敗,那么服務器會增加Aborted_connect變量的值,每失敗一次,變量值加1。

以下幾種情況會導致Aborted_connect變量值增加。

l 客戶端因為沒有權限訪問數據庫導致的連接失敗

l 客戶端因為密碼錯誤導致的連接失敗

l 連接包(connection packet)沒有包含正確的信息導致的連接失敗

l 獲取連接包耗費多余connect_timeout系統變量設置的時間導致的連接失敗,即連接超時(查看變量值SHOW GLOBAL VARIABLES LIKE 'connect_timeout';

Aborted_clients

如果客戶端成功連接,但是沒有以恰當的方式斷開連接,或者是被中斷,那么服務器會增加Aborted_clients狀態變量的值,每次加1,并記錄一條Aborted connection消息到錯誤日志。

以下幾種情況會導致Aborted_clients狀態變量值增加。

l 客戶端退出之前,沒有調用mysql_close()

l 客戶端“沉睡”,超過wait_timeout 或者 interactive_timeout設置時間(單位:秒)沒有向服務器發起任何請求。

l 客戶端程序在數據傳輸的期間突然終止。

導致aborted connections 或者aborted clients的其它原因

l max_allowed_packet 狀態變量的值設置太小,或者查詢需要消耗的內存比已經分配給mysqld的內存更大。查看SectionB.5.2.10, “Packet Too Large”。

l Linux使用的Ethernet協議,包含半雙工和全雙工。有些Linux Ethernet驅動存在這個bug。You should test for this bug by transferring a huge file using FTP between the client and server machines. If a transfer goes in burst-pause-burst-pause mode, you are experiencing a Linux duplex syndrome. Switch the duplex mode for both your network card and hub/switch to either full duplex or to half duplex and test the results to determine the best setting.

l 線程類庫存在問題導致讀取中斷。

l TCP/IP配置錯誤。

l Ethernets, hubs, switches, cables等故障,這些只能更換硬件。

參考鏈接:

https://dev.mysql.com/doc/refman/5.5/en/communication-errors.html

總結

以上是生活随笔為你收集整理的MySQL Aborted_clients和 Aborted_connects状态变量详解的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。