Configure Apache/Tomcat for large number of webapps

231 Views Asked by At

The most common error we receive in catalina.out is:

 Exception in thread "main" java.lang.OutOfMemoryError: PermGen space

We have web services installed that requires up to 100 Tomcat webapps be started and run all at the same time. Docs indicate we should allocate up to 128MB of RAM for each running Webapp. We have tried multiple Tomcat installations and a single installation (all on same server) but either the CPU is maxed out at startup OR RAM is exhausted.

I've modified the setenv.sh file to set some startup options which have helped, but we are still unable to get all 100 webapps running reliably. Here is what I have in our setenv.sh file:

JAVA_OPTS=" $JAVA_OPTS -d64 -Xms128m -Xmx2048m -XX:PermSize=256m-XX:MaxPermSize=2048m "
export JAVA_OPTS;

Server specs vary, but all are at least:

  • Solaris 11 x86 (Unix) VMs (VMware)
  • 8GB RAM Minimum
  • 2 CPUs Minimum (some have four)

There is plenty of disk space.

0

There are 0 best solutions below