mysql檢視連線數排查問題
#mysql檢視連線數
SHOW VARIABLES LIKE '%max_connections%';
# max_connections 最大連線數
SHOW VARIABLES LIKE '%connection%';
# PROCESSLIST;
# 通過觀察sql來判斷。
SHOW FULL PROCESSLIST
SHOW PROCESSLIST;
SHOW STATUS;
SHOW PROCESSLIST
#show extended-status;
SHOW STATUS LIKE '%connect%'; # 1219
# Connections 試圖連線到(不管是否成功)MYSQL伺服器的連線總數
# Threads_connected 當前的連線數
# Max_used_connections 伺服器啟動後已經同時使用過的連線最大數量(併發)
日誌分析,請求介面:
cat statxx.2017-04-01.*.log | grep -C 5 'ReqUri:/vx/chx/supx';
cat auxx-2017-04-01-*.log | grep -C 5 '/vx/chx/support';
cat auxx-error.2017-04-01.*.log | grep -C 5 '/vx/chx/supx';
auxx-2017-04-01 新的日誌
2017-04-01 08:33:28.414 [http-nio-7064-exec-7] INFO com.auxx.filter.VerxFilter#doFilter [line:52] - User-Agent:Autoyol_49:Android_23|
640BB43DC8FFE2A7323718CA9BE10674D30C3E3031DD223D3333333333, ReqUri:/vx/chx/supx ('POST' from 118.255.29.100)
statxx.2017-04-01 老的日誌
2017-04-01 11:57:32.698 [http-nio-7065-exec-7] INFO c.a.interceptor.DefaultInterceptor#preHandle [line:126] - User-Agent:Autoyol_48:iPhone_10.2.1|
98C82A94F57AD7CAE1CBADC404B9BF1D3EA5EDEAAA657A6117F426D42FD108C6A030B76B4B8E69, ReqUri:/traxx/v7x/reqxx ('POST' from 59.42.108.63)
2017-04-01