[if !supportLists]1、 [endif]问题现象描述
银行app个人中心修改用户地址信息,当大于50用户并发时CPU使用率超过100%,存在部分业务报错信息。
[if !supportLists]2、 [endif]问题定位过程
2.1、使用容器云,查看corecenter服务的日志,存在报错信息:An error occurred.Sorry, the page you are looking for is currentlyunavailable
[if !vml]
[endif]
2.2、登录windows机器,打开Jprofile工具,选择需要监控的服务。
[if !vml]
[endif]
[if !vml]
[endif]
[if !vml]
[endif]
[if !vml]
[endif]
连接时注意要查看对应物理机服务对应的端口。
[if !vml]
[endif]
2.3、在压力测试场景执行时,查看CPU Views页签,查看消耗资源最高的方法。
[if !vml]
[endif]
存在zatech.bank.corecenter的代码方法调用。定位到代码位置。
com.zatech.bank.framework.log.pattern.ZaFileOfCallerConverter.convert是最终的方法
另外报错的原因开发定位为:在消息发送时为了获取英文名称查询到很多不需的信息,同时在地址转换时存在过多的对象转换
[if !supportLists]3、 [endif]问题解决方案
3.1、CPU占用问题通过分析jprofile抓取的方法,com.zatech.bank.framework.log.pattern.ZaFileOfCallerConverter.convert
为日志组件占用,logback组件比较消耗CPU,此问题由于开发需要更详细的日志来定位生产问题。生产环境暂时不能进行处理优化。
3.2、业务报错问题,开发修改代码进行了简化消息发送时的多余查询,优化多余的对象转换。
[if !supportLists]4、 [endif]优化后结果
4.1、个人中心修改地址信息在50、80用户不同压力并发下无业务报错问题。
[if !vml]
[endif]
4.2、CPU使用率高问题,是日志组件占用,和业务代码逻辑没关系。且日志是定位生产问题的必要内容,可暂时不处理。