Tomcat CPU Usage on Ubuntu 14.04

February 13, 2017 351 views
Applications DigitalOcean Java MongoDB Ubuntu

I deployed Java web applibation on Tomcat with Mongodb in Ubuntu 14.04. But Tomcat CPU usage increases suddenly to %100 after 5-6 hours. I couldnt find why.
Help please.

2 Answers

@gencaysahinn

We'd need more information about your setup/configuration and application before we could really help to diagnose the issue.

Beyond setup/configuration, Droplet size should also be taken in to account. If you're running this on a 512MB Droplet, you may need to upgrade. The same if you're running on a 1GB Droplet. It all really depends on how much resources are being used by each service.

You can get a general idea of how much CPU & RAM is being used by looking at the output of the top command:

top

Once top is running, hit SHIFT+M, then c, and finally e. That'll help you sort your processes by usage and also extend what is actually being ran. The last command, e, displays RAM/CPU in human readable format (MB/GB), which makes it a little easier to see how much is being consumed.

Tomcat use 100%cpu and Command was /usr/lib/jvm/default-java/bin/java-Djava.util.logging.config.file.... Then i looked logs and i saw that
**INFO: Error parsing HTTP request header

Have another answer? Share your knowledge.