Java uses 100% CPU on Linux

On my Linux server, any Java program (even "Hello world") uses 100% CPU and is very slow ID does not depend on the Java version. I have tried different versions of openjdk and sun JDK, both of which behave the same How can I solve this problem?

Solution

I found the solution in this article http://blog.wpkg.org/2012/07/01/java-leap-second-bug-30-june-1-july-2012-fix/

This is a good opportunity, which is caused by the leap second kernel bug First, check the following in dmesg

[10703552.860274] Clock: inserting leap second 23:59:60 UTC

To fix it, first stop the NTP client On Debian like systems

/etc/init.d/ntp stop

Store current time

date -s Now

And test Java If everything is OK, try restarting the NTP service

/etc/init.d/ntp start

And test it again

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>