webman log 插件记录的日志如何分析问题啊

864328615
> [2022-06-07 06:59:47] default.INFO: 117.158.216.166 GET xxx.cn/applet/article/info?id=11 [8460.69s] [webman/log]
[SQL] SELECT `id`,`title`,`img`,`background_img`,`background_color`,`desc` FROM `h_cms_article` WHERE (  `id` = 11  AND `status` = 1 ) AND `h_cms_article`.`delete_time` = '0' LIMIT 1 [ RunTime:0.000430s ]
[SQL] UPDATE `h_cms_article`  SET `hits_num` = hits_num+1 , `update_time` = 1654547926  WHERE (  `id` = 11 ) AND `h_cms_article`.`delete_time` = '0' [ RunTime:8,460.687964s ]
[SQL] SELECT * FROM `h_cms_article_collect` WHERE  `user_id` = 37  AND `article_id` = 11 LIMIT 1 [ RunTime:0.000481s ]
 [] []
[2022-06-07 06:59:47] default.INFO: 1.198.210.63 POST xxxx.cn/admin/index/login [79.9214s] [webman/log]
[POST] array (
  'username' => 'xxx',
  'password' => 'xxx',
  'pass_token' => '76b38e89c94a18c8c4bc57e06961a0cf38ec6569d8557e65cc74142b64f47f26',
  'autologin' => 0,
  'captcha_id' => '3481ebc72502dde2f18acd46a9637905',
  'lot_number' => '2ae6fe91c02b43f695b4e65bafdb0407',
  'gen_time' => '1654556305',
  'captcha_output' => 'hVxcgp_hxxdB0yKPNVzMYVERCWw5hq3t_m0lqfo6E1s8D6TSJl8QkTnfYCFHbLeBWCwQUViqWXGiWKA44lQyHIvac4zH1lM2hvNm0Z2NMwvBjiQ0owCPOHejggb5SuQnaBrhtYHLvfPlCyhN2Z4oyLrBWod4gSwdwdxCYlJBl6WmmqYsYKs9QUE9HIHylrAV',
)
[SQL] select 1 [ RunTime:0.000169s ]
[SQL] select 1 [ RunTime:0.000162s ]
[SQL] select 1 [ RunTime:0.000200s ]
[SQL] select 1 [ RunTime:0.000186s ]
[SQL] select 1 [ RunTime:0.000167s ]
[SQL] select 1 [ RunTime:0.000199s ]
[SQL] select 1 [ RunTime:0.000160s ]
[SQL] select 1 [ RunTime:0.000181s ]
[SQL] select 1 [ RunTime:0.000170s ]
[SQL] select 1 [ RunTime:0.000166s ]
[SQL] select 1 [ RunTime:0.000152s ]
[SQL] select 1 [ RunTime:0.000172s ]
[SQL] select 1 [ RunTime:0.000166s ]
[SQL] select 1 [ RunTime:0.000169s ]
[SQL] select 1 [ RunTime:0.000165s ]
[SQL] select 1 [ RunTime:0.000172s ]
[SQL] select 1 [ RunTime:0.000165s ]

哪个大佬能帮忙分析下这个sql日志吗 [8460.69s] [webman/log] [79.9214s] [webman/log] 这里面是时间是请求时常吗

984 3 0
3个回答

864328615

自己回答一下,在这个同一个时刻 宝塔备份数据库备份也出现了问题,我设置的备份规则是30分钟备份一次,结果在06:59:47这个时刻形成了10多次的数据库备份

  • 暂无评论
walkor

对,请求时长

  • 864328615 2022-06-07

    大佬 这个是数据库的问题吗 还是说网络的问题,还nginx代理层的问题(这个优化了很多次了),这个问题会偶然出现,测试都很难测出来

  • 864328615 2022-06-07

    会是那个时间短 数据库正在备份的缘故吗,因为前端抛出了以SQL开头的错误提示,太快了 没有截到图,但是同时刻的数据库备份出现了10多次

  • walkor 2022-06-07

    可能是备份数据库锁表导致的

walkor

更新下 composer require webman/log ^1.0.1 ,第二个79.9214s可能是插件计算错误,正确时间可能是0.000079s。

年代过于久远,无法发表回答
🔝