Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add akka.daemonic to setenv.sh fix

...

Code Block
languagebash
titlereload environment
. /home/shrine/.bashrc

Additional CATALINA_OPTS settings (fixes PermGen and hanging thread issues)

For installations running multiple apps (steward.war, dashboard.war, etc), you may notice severely degraded performance (or complete unresponsiveness) shortly after starting Tomcat. This will result in a "java.lang.OutOfMemoryError: PermGen space

...

" error in the logs. 

Additionally, you may notice issues attempting to shut down Tomcat. Due to a thread still running even after the shutdown command is given, the Tomcat process will never completely terminate. After several startup/shutdown cycles, this can result in severely degraded performance of future Tomcat instances.

To fix either of these issues, you will Depending on the version of Java you are running, you may need to create a file called setenv.sh in Tomcat's bin/ folder folder and add additional values to increase the PermGen size given to it. If you are suddenly unable to access SHRINE and catalina.out contains multiple OutOfMemoryError messages, you should create setenv.sh. make sure this file is the environment variable CATALINA_OPTS. Make sure setenv.sh is owned by the same user that runs SHRINE, and make sure it is executable:

...

Code Block
languagebash
titlesetenv.sh contents
export CATALINA_OPTS=" -XX:MaxPermSize=256m "

If using Windows, the file should be named setenv.bat instead, and the contents should look something like this:

Code Block
languagepowershell
titlesetenv.bat contents
set CATALINA_OPTS=-XX:MaxPermSize=256m-Dakka.daemonic=on "

Restart SHRINE to make the changes take effect.