Basil
Basil

Reputation: 889

Java high cpu usage Debian

When I run any Java program on my Debian server (e.g. tomcat, jvirtualvm) the cpu usage spikes to 100% and then always stays between 80% and 120%. As jvirtualvm also leads to this problem, I can't really use it to debug. Any ideas how I could find out more? This happens when I use sun-java or open-jdk. I installed both from the repositories.

Upvotes: 0

Views: 865

Answers (1)

waynet
waynet

Reputation: 147

I did have the similar issue before trying to run tomcat on ubuntu, I was using apt-get to install tomcat packages as it's easy, but it seems very complicated to use.

So I tried installing tomcat from http://ftp.heanet.ie/mirrors/www.apache.org/dist/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz

Just download the tarball, and extract it to /opt like this

wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz
tar xfzv apache-tomcat-6.0.35.tar.gz
sudo mv apache-tomcat-6.0.35 /opt/tomcat

Now if you have JDK installed already, just start your tomcat with,

sudo /opt/tomcat/bin/startup.sh

and then access your tomcat,

http://localhost:8080

You might need to remove your existing tomcat packages first.

Upvotes: 1

Related Questions