Mysql5
什麼會導致對 mysql5 數據庫的身份驗證延遲?
我有一個 mysql5.0 伺服器,它驗證數據庫請求的速度非常慢。在幾個請求之後,有一個積壓的程序,顯示等待登錄:
| Id | User | Host | db | Command | Time | State | Info | +----+----------------------+--------------------+------+---------+------+-------+------------------+ | 1 | root | 192.168.1.15:51725 | ouw | Query | 0 | NULL | show processlist | | 13 | unauthenticated user | 192.168.1.4:47782 | NULL | Connect | NULL | login | NULL | | 14 | unauthenticated user | 192.168.1.4:47783 | NULL | Connect | NULL | login | NULL | | 15 | unauthenticated user | 192.168.1.4:47784 | NULL | Connect | NULL | login | NULL | | 16 | unauthenticated user | 192.168.1.4:47785 | NULL | Connect | NULL | login | NULL | | 17 | unauthenticated user | 192.168.1.4:47786 | NULL | Connect | NULL | login | NULL | | 18 | unauthenticated user | 192.168.1.4:47787 | NULL | Connect | NULL | login | NULL | | 19 | unauthenticated user | 192.168.1.4:47788 | NULL | Connect | NULL | login | NULL | | 20 | unauthenticated user | 192.168.1.4:47789 | NULL | Connect | NULL | login | NULL | | 21 | unauthenticated user | 192.168.1.4:47790 | NULL | Connect | NULL | login | NULL | | 22 | unauthenticated user | 192.168.1.4:47791 | NULL | Connect | NULL | login | NULL | | 23 | unauthenticated user | 192.168.1.4:47792 | NULL | Connect | NULL | login | NULL | | 24 | unauthenticated user | 192.168.1.4:38101 | NULL | Connect | NULL | login | NULL | | 25 | unauthenticated user | 192.168.1.4:38102 | NULL | Connect | NULL | login | NULL | | 26 | unauthenticated user | 192.168.1.4:38103 | NULL | Connect | NULL | login | NULL | | 27 | unauthenticated user | 192.168.1.4:38104 | NULL | Connect | NULL | login | NULL | | 28 | unauthenticated user | 192.168.1.4:38105 | NULL | Connect | NULL | login | NULL | ...
等等。最早的連接會慢慢斷開,但如果有很多連接,它們的請求者最終會超時。程序列表條目在表中停留了很長一段時間。就好像一次只有一個執行緒可以進行身份驗證。
伺服器崩潰並重新啟動。我仔細檢查了數據庫憑據並針對 mysql 和 wordpress 數據庫執行 myisamchk -f。(除了不正確關閉的表之外沒有錯誤)
什麼可能導致這種放緩?
看看DNS是否有效。恕我直言 mysql 嘗試對客戶端 IP 進行反向查找。如果超時 (UDP) 可能會導致這樣的影響