本文主要給大家介紹的是關于MySQL中Aborted告警的相關內容,分享出來供大家參考學習,下面來一起看看詳細的介紹:
實戰
Part1:寫在最前
在MySQL的error log中,我們會經常性看到一些各類的Aborted connection錯誤,本文中會針對這類錯誤進行一個初步分析,并了解一個問題產生后的基本排查思路和方法。掌握這種方法是至關重要的,而不是出現問題了,去猜,去試。數據庫出現問題的時候需要DBA在短時間內快速解決問題,因此一個好與壞的DBA,區別也在于此。
Part2:種類
| [Warning] Aborted connection 305628 to db: 'db' user: 'dbuser' host: 'hostname' (Got an error reading communication packets)[Warning] Aborted connection 81 to db:'unconnected' user: 'root' host: '127.0.0.1' (Got timeout reading communicationpackets)[Warning] Aborted connection 109 to db:'helei1' user: 'sys_admin' host: '192.168.1.1' (Got an error writing communication packets)[Warning] Access denied for user 'root'@'127.0.0.1' (using password: YES)[Warning] Got an error writing communication packets |
Part3:重點參數分析
wait_timeout
| Command-Line Format | --wait-timeout=# | ||
| System Variable | Name | wait_timeout | |
| Variable Scope | Global, Session | ||
| Dynamic Variable | Yes | ||
| Permitted Values (Windows) | Type | integer | |
| Default | 28800 | ||
| Min Value | 1 | ||
| Max Value | 2147483 | ||
| Permitted Values (Other) | Type | integer | |
| Default | 28800 | ||
| Min Value | 1 | ||
| Max Value | 31536000 | ||
這個參數指的是數據庫系統在關閉它之前,服務器等待非交互式連接上的活動的秒數。
interactive_timeout
| Command-Line Format | --interactive-timeout=# | ||
| System Variable | Name | interactive_timeout | |
| Variable Scope | Global, Session | ||
| Dynamic Variable | Yes | ||
| Permitted Values | Type | integer | |
| Default | 28800 | ||
| Min Value | 1 | ||
新聞熱點
疑難解答