性能问答>codecache full问题求救>
0回复
4月前

codecache full问题求救



您好,我这边线上环境遇到个问题,请求大佬能帮忙看看:

一、问题描述:

线上的某个应用对外提供http接口,该应用的逻辑比较简单,只是组合调用RPC接口,RPC框架是公司自研的,应用运行一段时间之后,会有部份机器(并不是所有机器)的codecache使用逐步上升,最终超过阀值;

 

二、环境说明

  spring boot webflux应用,使用的jdk版本为1.8.0_241,spring boot版本为2.3.7.RELEASE,spring版本为5.2.12.Release,reactor为3.3.12.RELEASE,k8s容器,linux为3.10.0-1160.45.1.e17.x86_64

 

三、尝试过的解决办法

  调大codecache,从默认值240m改为480M,但只能缓解问题,并不能彻底解决问题;通过sa工具打印了codecache内容,发现里面有个方法好像是被编译了多次似的:

NMethod for com/ximalaya/mobile/playpage/service/assembler/TrackTabsAssembler.getTabInfoByCategoryIdAndMetaDataVaules(Lcom/ximalaya/track/cell/api/model/DetailTrackDto;Lcom/ximalaya/service/content/thrift/BasicAlbum;Lcom/ximalaya/mobile/playpage/vo/EbookInfo;Lcom/ximalaya/mobile/playpage/vo/EPubInfo;ILcom/ximalaya/play/url/common/thrift/PlayUrlItemDTO;Ljava/lang/String;)Ljava/util/List; content: [0x00007f552999f0e0, 0x00007f55299a2268),  code: [0x00007f552999f0e0, 0x00007f55299a2268),  data: [0x00007f55299a2268, 0x00007f55299a5968),  oops: [0x00007f55299a2268, 0x00007f55299a22b0),  frame size: 784
NMethod for com/ximalaya/mobile/playpage/service/assembler/TrackTabsAssembler.getTabInfoByCategoryIdAndMetaDataVaules(Lcom/ximalaya/track/cell/api/model/DetailTrackDto;Lcom/ximalaya/service/content/thrift/BasicAlbum;Lcom/ximalaya/mobile/playpage/vo/EbookInfo;Lcom/ximalaya/mobile/playpage/vo/EPubInfo;ILcom/ximalaya/play/url/common/thrift/PlayUrlItemDTO;Ljava/lang/String;)Ljava/util/List; content: [0x00007f55299a6020, 0x00007f55299a91a8),  code: [0x00007f55299a6020, 0x00007f55299a91a8),  data: [0x00007f55299a91a8, 0x00007f55299ac8a8),  oops: [0x00007f55299a91a8, 0x00007f55299a91f0),  frame size: 784
NMethod for com/ximalaya/mobile/playpage/service/assembler/TrackTabsAssembler.getTabInfoByCategoryIdAndMetaDataVaules(Lcom/ximalaya/track/cell/api/model/DetailTrackDto;Lcom/ximalaya/service/content/thrift/BasicAlbum;Lcom/ximalaya/mobile/playpage/vo/EbookInfo;Lcom/ximalaya/mobile/playpage/vo/EPubInfo;ILcom/ximalaya/play/url/common/thrift/PlayUrlItemDTO;Ljava/lang/String;)Ljava/util/List; content: [0x00007f55299acf60, 0x00007f55299b00e8),  code: [0x00007f55299acf60, 0x00007f55299b00e8),  data: [0x00007f55299b00e8, 0x00007f55299b37e8),  oops: [0x00007f55299b00e8, 0x00007f55299b0130),  frame size: 784
NMethod for com/ximalaya/mobile/playpage/service/assembler/TrackTabsAssembler.getTabInfoByCategoryIdAndMetaDataVaules(Lcom/ximalaya/track/cell/api/model/DetailTrackDto;Lcom/ximalaya/service/content/thrift/BasicAlbum;Lcom/ximalaya/mobile/playpage/vo/EbookInfo;Lcom/ximalaya/mobile/playpage/vo/EPubInfo;ILcom/ximalaya/play/url/common/thrift/PlayUrlItemDTO;Ljava/lang/String;)Ljava/util/List; content: [0x00007f55299b3ea0, 0x00007f55299b7028),  code: [0x00007f55299b3ea0, 0x00007f55299b7028),  data: [0x00007f55299b7028, 0x00007f55299ba728),  oops: [0x00007f55299b7028, 0x00007f55299b7070),  frame size: 784
NMethod for com/ximalaya/mobile/playpage/service/assembler/TrackTabsAssembler.getTabInfoByCategoryIdAndMetaDataVaules(Lcom/ximalaya/track/cell/api/model/DetailTrackDto;Lcom/ximalaya/service/content/thrift/BasicAlbum;Lcom/ximalaya/mobile/playpage/vo/EbookInfo;Lcom/ximalaya/mobile/playpage/vo/EPubInfo;ILcom/ximalaya/play/url/common/thrift/PlayUrlItemDTO;Ljava/lang/String;)Ljava/util/List; content: [0x00007f55299bade0, 0x00007f55299bdf68),  code: [0x00007f55299bade0, 0x00007f55299bdf68),  data: [0x00007f55299bdf68, 0x00007f55299c1668),  oops: [0x00007f55299bdf68, 0x00007f55299bdfb0),  frame size: 784
NMethod for com/ximalaya/mobile/playpage/service/assembler/TrackTabsAssembler.getTabInfoByCategoryIdAndMetaDataVaules(Lcom/ximalaya/track/cell/api/model/DetailTrackDto;Lcom/ximalaya/service/content/thrift/BasicAlbum;Lcom/ximalaya/mobile/playpage/vo/EbookInfo;Lcom/ximalaya/mobile/playpage/vo/EPubInfo;ILcom/ximalaya/play/url/common/thrift/PlayUrlItemDTO;Ljava/lang/String;)Ljava/util/List; content: [0x00007f55299c1d20, 0x00007f55299c4ea8),  code: [0x00007f55299c1d20, 0x00007f55299c4ea8),  data: [0x00007f55299c4ea8, 0x00007f55299c85a8),  oops: [0x00007f55299c4ea8, 0x00007f55299c4ef0),  frame size: 784

 

 

四、问题

  1. TrackTabsAssembler.getTabInfoByCategoryIdAndMetaDataVaules为什么在code cache中会存在多份?
  2. 对于code cache full多的情况,还有哪些解决的思路呢?

 

 

406 阅读
请先登录,感受更多精彩内容
快去登录吧,你将获得
  • 浏览更多精彩评论
  • 和开发者讨论交流,共同进步