Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

java.lang.OutOfMemoryError: PermGen space

Depending on the version of Java you are running, you may need to create a file called setenv.sh in Tomcat's bin/ folder to increase the PermGen size given to it. If you are suddenly unable to access SHRINE and catalina.out logs multiple OutOfMemoryError messages, you should create setenv.sh, make sure it is owned by the same user that runs SHRINE, and make sure it is executable:

Code Block
titlecreating setenv.sh
$ cd /opt/shrine/tomcat/bin
$ vi setenv.sh
$ sudo chown shrine:shrine setenv.sh
$ sudo chmod 755 setenv.sh

The contents of setenv.sh should look like this:

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

Restart SHRINE to make the changes take effect.