alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.17k stars 12.82k forks source link

windows10,nacos1.2.1,windows睡眠模式结束后,nacos占用cpu过高。 #3557

Closed AKM000 closed 4 years ago

AKM000 commented 4 years ago
nacos

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

KomachiSion commented 4 years ago

Can you dump thread or use arthas find out what's cost the cpus?

And please edit your issue description with template for others friendly?

KomachiSion commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

Expected behavior A clear and concise description of what you expected to happen.

Acutally behavior A clear and concise description of what you actually to happen.

How to Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

AKM000 commented 4 years ago

Can you dump thread or use arthas find out what's cost the cpus?

And please edit your issue description with template for others friendly?

Can you dump thread or use arthas find out what's cost the cpus?

And please edit your issue description with template for others friendly?

Can you dump thread or use arthas find out what's cost the cpus?

And please edit your issue description with template for others friendly?

今天我试着重现那个情况,但一直没有复现。如果以后出现,会联系你的。

AKM000 commented 4 years ago

今天回来用尽各种方法尝试复现问题,没成功。 然后刷微博的时候突然电脑卡,任务管理器显示打开nacos的那个cmd程序占用cpu过高。 具体过程如下 1:在bin目录下双击startup.cmd启动程序 2:然后向nacos注册了一个服务,作为测试 3:大概十分钟后关闭服务(强制关闭) 4:弄了些其他的,nacos一直启动着(这是没有任何服务注册,就单纯一个程序运行),只是那段时间没有使用电脑 5:然后及打开微博(忘记关闭nacos了),然后电脑就卡。 以下截图来自于jvisualvm,hprof文件来自于jmap dump。 我看了一下dump文件,也看不太懂。

------------------ 原始邮件 ------------------ 发件人: "alibaba/nacos" <notifications@github.com>; 发送时间: 2020年8月10日(星期一) 上午9:03 收件人: "alibaba/nacos"<nacos@noreply.github.com>; 抄送: "hY"<3311676596@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [alibaba/nacos] windows10,nacos1.2.1,windows睡眠模式结束后,nacos占用cpu过高。 (#3557)

Can you dump thread or use arthas find out what's cost the cpus?

And please edit your issue description with template for others friendly?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

从QQ邮箱发来的超大附件

2020_8_10.hprof (154.62M, 2020年09月09日 21:06 到期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?k=7533303275346595851f54f71239014c50075206020052541c5606035014075553571d0b0458044e530a5604030b0b5755525107343633510101006d0c6602531f5b40405b5f335e&t=exs_ftn_download&code=1302493c

KomachiSion commented 4 years ago
  1. 截图看不到
  2. 文件太大了 不好下载,建议还是拿arthas打火焰图出来,简单又明确。
AKM000 commented 4 years ago

抱歉,我还在学习阶段。arthas这个东西我还是第一次听说。并且那个情况是随机出现的。 ------------------ 原始邮件 ------------------ 发件人: "杨翊&nbsp;SionYang"<notifications@github.com> 发送时间: 2020年8月11日(星期二) 上午9:41 收件人: "alibaba/nacos"<nacos@noreply.github.com>; 抄送: "AKM000"<3311676596@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [alibaba/nacos] windows10,nacos1.2.1,windows睡眠模式结束后,nacos占用cpu过高。 (#3557)

KomachiSion commented 4 years ago

@AKM000 信息太少了,没办法判断问题。建议看一下arthas,挺好用的。

@zongtanghu 有空麻烦试着复现下。如果复现不了,那可能就是环境问题了。

KomachiSion commented 4 years ago

从 dump出来的线程来看,没有什么特别的线程在处理,只有netty和nio线程在轮训,看不出来是什么导致CPU升高,估计还是需要打印火焰图来分析。

AKM000 commented 4 years ago

对,好像不是。我前天运行别的jar包,也是莫名其妙也出现了CPU占用过高的情况。这应该不是nacos的原因,应该是我系统的问题。------------------ 原始邮件 ------------------ 发件人: "杨翊&nbsp;SionYang"<notifications@github.com> 发送时间: 2020年8月21日(星期五) 上午10:02 收件人: "alibaba/nacos"<nacos@noreply.github.com>; 抄送: "AKM000"<3311676596@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [alibaba/nacos] windows10,nacos1.2.1,windows睡眠模式结束后,nacos占用cpu过高。 (#3557)

KomachiSion commented 4 years ago

那我先关Issue了,之后再出现的话,建议用arthas打一下火焰图,然后再提个issue。

tanranv5 commented 4 years ago

我也遇到了上诉问题,但是我如何用arthas生成火焰图呢?【AsyncProfiler error: Current OS do not support AsyncProfiler, Only support Linux/Mac. 】

xmf1142987374 commented 4 years ago

我也是的,最近出现了几次,nacos 开着,然后有时候就cpu 直接占满了,然后我只好重启nacos 。我的版本是1.2.0

xmf1142987374 commented 4 years ago

1.2.10和1.2.1 都试过了。环境: windows10 。 操作: 启动nacos 大概过两个小时~两个半小时 ,cpu 占满 居高不下 。

xmf1142987374 commented 4 years ago

1

xmf1142987374 commented 4 years ago

最新的nacos 版本也是这样 ,我就启动nacos 然后什么都不做,等待大概两个多小时,cpu 就突然一下子被它占满

KamSss commented 3 years ago

那我先关Issue了,之后再出现的话,建议用arthas打一下火焰图,然后再提个issue。

你好,nacos版本号1.3.2,同样出现上述问题,启动一小时左右nacos开始占满内存,麻烦看一下。

KamSss commented 3 years ago

@KomachiSion

ldkkkkk commented 2 years ago

2个小时数据库连接池里的连接失效了,然后cpu就100%了