Issue Description
just start up nacos,after sometime it will cost Hign cpu, like 98%,
some stack log:
"New I/O worker #6" #99 daemon prio=5 os_prio=0 tid=0x0000000023f85800 nid=0x3514 runnable [0x000000002e97e000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl.resetWakeupSocket0(Native Method)
at sun.nio.ch.WindowsSelectorImpl.resetWakeupSocket(WindowsSelectorImpl.java:473)
- locked <0x00000006c3903b58> (a java.lang.Object)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:174)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked <0x00000006c3900568> (a sun.nio.ch.Util$2)
- locked <0x00000006c3900558> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000006c3900408> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at org.jboss.netty.channel.socket.nio.SelectorUtil.select(SelectorUtil.java:64)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.select(AbstractNioSelector.java:409)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:206)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Locked ownable synchronizers:
- <0x00000006c39000d0> (a java.util.concurrent.ThreadPoolExecutor$Worker)
Tell us your environment
windows10 nacos V1.0.1, also nacos V1.1.3
4条答案
按热度按时间0h4hbjxa1#
This problem is possibly triggered by nio version:
https://stackoverflow.com/questions/36284833/spring-boot-application-starts-using-all-cpu
We can have a try and see what happens:
https://my.oschina.net/u/252181/blog/832562
mrfwxfqh2#
I just start nacos, why modify tomcat conf?
kcwpcxri3#
Hello @nkorange ,I have a similar problem.In cluster mode, each Nacos server uses about 4% CPU and 10% mem,Is this normal? Can I lower the occupancy?If it's a NiO problem, have you fixed it?My nacos version is 1.2.1,run in docker 19+.
kwvwclae4#
CPU占用很高的两个线程