Search code examples
javatomcatgarbage-collectionwindows-server-2008ram

Java/Tomcat heap size question


I am not a Java dev, but an app landed on my desk. It's a web-service server-side app that runs in a Tomcat container. The users hit it up from a client application.

The users constantly complain about how slow it is and the app has to be restarted about twice a week, cause things get really bad.

The previous developer told me that the app simply runs out of memory (as it loads more data over time) and eventually spends all its time doing garbage collection. Meanwhile, the Heap Size for Tomcat is set at 6GB. The box itself has 32GB of RAM.

Is there any harm in increasing the Heap Size to 16GB?
Seems like an easy way to fix the issue, but I am no Java expert.


Solution

  • No, there is no harm in increasing the Heap Size to 16GB.