In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "the methods and steps of the investigation online interface timeout alarm". In the daily operation, it is believed that many people have doubts about the methods and steps of the investigation online interface timeout alarm. The editor consulted all kinds of data and sorted out the simple and easy-to-use operation methods. I hope it will be helpful for everyone to answer the doubts about the methods and steps of the investigation online interface timeout alarm. Next, please follow the editor to study!
Common commands include dashboard, thread-n, watch, trace, tt and so on.
Trace: you can output the execution time of each subcall in real time, input parameters, return value, and check whether there is any exception in the call. You can check the specific parameter meaning through trace-h. Tt: extract a time-consuming call and replay it. You can check the specific parameter meaning through tt-h.
Step 1: trace location time-consuming code:
Trace command output takes more than 900ms to call
Trace com.kuaikan.comicbuy.repository.impl.ComicBuyRepositoryImpl getAllComicOrderFromDB'# cost > 900' / / View the time-consuming call path watch com.kuaikan.comicbuy.dao.comicbuy.ComicOrderMapper getHadPurchasedComicNumByTopicId {params,returnObj}-x 2'# cost > 10'/ / to get specific time-consuming input parameters
Output result:
Arthas@25316] $trace com.kuaikan.comicbuy.repository.impl.ComicBuyRepositoryImpl getAllComicOrderFromDB'# cost > 900'Press Q or Ctrl+C to abort.Affect (class-cnt:2, method-cnt:1) cost in 786ms.`-ts=2020-03-27 14Groupe 08Groupe 28threadhorse name name DubboServerHandlerMai5 TCCL=org.springframework.boot.loader.LaunchedURLClassLoader@533377b `- [954.270866ms] com.kuaikan.comicbuy.repository.impl.ComicBuyRepositoryImpl:getAllComicOrderFromDB () +-- [0.010746ms] com.kuaikan.comicbuy.bean.ComicOrder:getTableNameByUserId () # 376 / / the code contains the ComicOrderMapper:getComicOrderByUserId executed in the loop, / / count=18 indicates the number of cycles, total is the total execution time, and min is the minimum execution time in the loop Max is the maximum execution time. +-[min=3.061773ms,max=272.769328ms,total=854.625477ms,count=18] com.kuaikan.comicbuy.dao.comicbuy.ComicOrderMapper:getComicOrderByUserId () # 382 +-- [min=0.001283ms,max=0.006587ms,total=0.036144ms,count=17] com.google.common.collect.Iterables:getLast () # 383 +-- [min=0.001431ms,max=0.003022ms,total=0.032525ms Count=17] com.kuaikan.comicbuy.bean.ComicOrder:getId () # 383 +-- [0.001445ms] com.google.common.collect.Lists:partition () # 395 +-[2.349703ms] com.kuaikan.comicbuy.dao.comicbuy.ComicOrderMapper:getComicOrderBatchIdsList () # 396 +-[min=2.27E-4ms,max=0.479048ms,total=7.025685ms,count=6736] com.kuaikan.comicbuy.bean.ComicOrder:getProductType () # 402 `- [min=8.2E-5ms] Max=0.150606ms,total=5.636961ms,count=6736] com.kuaikan.comicbuy.bean.ComicOrder:getProductType () # 403 step 2: tt command playback time-consuming call
The purpose of this step is to determine whether the time-consuming call is related to a specific input parameter. Tt commands output calls that take more than 500ms.
Tt-t com.kuaikan.comicbuy.repository.impl.ComicBuyRepositoryImpl getAllComicOrderFromDB'# cost > 500'
Output result:
INDEX TIMESTAMP COST (ms) IS-RET IS-EXP OBJECT CLASS METHOD -- 1014 2020-03-27 14:40: 576.2674 true false 0x79476a4e ComicBuyRepositoryImpl getAllComicOrderFromDB 37 15 1015 2020-03-27 14:40: 852.3366 true false 0x79476a4e ComicBuyRepositoryImpl getAllComicOrderFromDB 45 85 1016 2020-03-27 14:41: 894.5568 true false 0x79476a4e ComicBuyRepositoryImpl getAllComicOrderFromDB 08 44 1017 2020-03-27 14:41: 612.3478 true false 0x79476a4e ComicBuyRepositoryImpl getAllComicOrderFromDB 30 68 1018 2020-03-27 14:42: 1162.434 true false 0x79476a4e ComicBuyRepositoryImpl getAllComicOrderFromDB 00 85 1019 2020-03-27 14:42: 1194.843 true false 0x79476a4e ComicBuyRepositoryImpl getAllComicOrderFromDB 00 248 step 3: repeat timeout requests
The call to INDEX = 1018 took 1162.434 milliseconds, which must have reported a RPC timeout.
View the details of one of the tt-I 1018
Replay the request: tt-I 1018-p
At this point, the study on the "methods and steps of investigating online interface timeout alarm" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.