Tomcat – Debian – Out of memory
Out of memory error of tomcat on Debian 5.0 Lenny
The error appears because a standard Java VM (tomcat runs with such a VM) allocates onlya standard value of memory. On some machines tomcat needs more memory because the OXtender for MS Outlook.
To avoid that tomcat runs out of memory, the following line has to be added to the beginning of the file /usr/share/tomcat/bin/catalina.sh:
JAVA_OPTS=” -server -ms20M -mx1024M ”
This line allocates 20 MB on startup and as a maximum 1024 MB – There can also be taken higher values; depends on the memory the hardware has.
Tomcat has to be stopped while editing this file. Afterwards tomcat can be started with the command