nacos频繁挂 | GC内存问题 | Metadata GC Threshold

背景:公司使用的nacos,频繁挂,查看日志发现:

Java HotSpot(TM) 64-Bit Server VM (25.144-b01) for linux-amd64 JRE (1.8.0_144-b01), built on Jul 21 2017 21:57:33 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)
Memory: 4k page, physical 7733000k(980916k free), swap 0k(0k free)
CommandLine flags: -XX:GCLogFileSize=104857600 -XX:InitialHeapSize=838860800 -XX:MaxHeapSize=838860800 -XX:MaxNewSize=536870912 -XX:NewSize=536870912 -XX:NumberOfGCLogFiles=10 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseGCLogFileRotation -XX:+UseParallelGC
2021-05-10T13:40:01.058+0800: 1.899: [GC (Allocation Failure) [PSYoungGen: 393216K->14602K(458752K)] 393216K->14682K(753664K), 0.0332061 secs] [Times: user=0.05 sys=0.00, real=0.03 secs]
2021-05-10T13:40:01.367+0800: 2.208: [GC (Metadata GC Threshold) [PSYoungGen: 240789K->7036K(458752K)] 240869K->7124K(753664K), 0.0082750 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
2021-05-10T13:40:01.375+0800: 2.216: [Full GC (Metadata GC Threshold) [PSYoungGen: 7036K->0K(458752K)] [ParOldGen: 88K->6934K(294912K)] 7124K->6934K(753664K), [Metaspace: 20545K->20544K(1067008K)], 0.0323848 secs] [Times: user=0.06 sys=0.01, real=0.03 secs]
2021-05-10T13:40:02.698+0800: 3.539: [GC (Allocation Failure) [PSYoungGen: 393216K->20800K(458752K)] 400150K->27743K(753664K), 0.0452991 secs] [Times: user=0.10 sys=0.00, real=0.05 secs]
2021-05-10T13:40:03.351+0800: 4.191: [GC (Allocation Failure) [PSYoungGen: 414016K->46336K(458752K)] 420959K->53287K(753664K), 0.0987623 secs] [Times: user=0.20 sys=0.02, real=0.10 secs]
2021-05-10T13:40:04.251+0800: 5.091: [GC (Allocation Failure) [PSYoungGen: 439552K->35680K(458752K)] 446503K->42638K(753664K), 0.0570666 secs] [Times: user=0.10 sys=0.01, real=0.06 secs]
2021-05-10T13:40:05.113+0800: 5.954: [GC (Allocation Failure) [PSYoungGen: 428896K->52196K(448512K)] 435854K->60058K(743424K), 0.0863622 secs] [Times: user=0.20 sys=0.01, real=0.08 secs]
2021-05-10T13:40:06.233+0800: 7.074: [GC (Allocation Failure) [PSYoungGen: 448484K->41504K(438272K)] 456346K->49374K(733184K), 0.0583297 secs] [Times: user=0.12 sys=0.00, real=0.05 secs]
2021-05-10T13:40:06.855+0800: 7.695: [GC (Metadata GC Threshold) [PSYoungGen: 272961K->20096K(460800K)] 280832K->38998K(755712K), 0.0251000 secs] [Times: user=0.06 sys=0.01, real=0.02 secs]
2021-05-10T13:40:06.880+0800: 7.721: [Full GC (Metadata GC Threshold) [PSYoungGen: 20096K->0K(460800K)] [ParOldGen: 18902K->36793K(294912K)] 38998K->36793K(755712K), [Metaspace: 34142K->34142K(1081344K)], 0.1114338 secs] [Times: user=0.30 sys=0.01, real=0.11 secs]
2021-05-10T13:40:09.271+0800: 10.112: [GC (Allocation Failure) [PSYoungGen: 395776K->16020K(459264K)] 432569K->52821K(754176K), 0.0290022 secs] [Times: user=0.05 sys=0.00, real=0.03 secs]
2021-05-10T13:40:10.714+0800: 11.555: [GC (Allocation Failure) [PSYoungGen: 411796K->23475K(464896K)] 448597K->60284K(759808K), 0.0213923 secs] [Times: user=0.05 sys=0.00, real=0.02 secs]
2021-05-10T13:40:10.989+0800: 11.830: [GC (Metadata GC Threshold) [PSYoungGen: 131169K->2816K(462336K)] 167978K->59275K(757248K), 0.0329431 secs] [Times: user=0.10 sys=0.01, real=0.03 secs]
2021-05-10T13:40:11.022+0800: 11.863: [Full GC (Metadata GC Threshold) [PSYoungGen: 2816K->0K(462336K)] [ParOldGen: 56459K->53295K(294912K)] 59275K->53295K(757248K), [Metaspace: 56588K->56588K(1101824K)], 0.2006037 secs] [Times: user=0.69 sys=0.00, real=0.21 secs]
2021-05-10T13:40:12.591+0800: 13.432: [GC (Allocation Failure) [PSYoungGen: 402944K->16623K(465408K)] 456239K->69927K(760320K), 0.0229099 secs] [Times: user=0.06 sys=0.00, real=0.03 secs]
2021-05-10T13:40:15.691+0800: 16.532: [GC (Allocation Failure) [PSYoungGen: 421103K->32440K(463360K)] 474407K->98060K(758272K), 0.0342910 secs] [Times: user=0.08 sys=0.01, real=0.04 secs]
2021-05-10T13:42:50.751+0800: 171.591: [GC (Allocation Failure) [PSYoungGen: 436920K->9536K(466432K)] 502540K->100073K(761344K), 0.7742505 secs] [Times: user=0.07 sys=0.02, real=2.07 secs]

所以推断是内存问题。通过百度,找到一篇文章不错,链接如下:      https://blog.csdn.net/liubenlong007/article/details/78143285 

  • 22
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值