If your Tomcat is running out of memory, take a look at the following issue posted by Atlassian. It affects basically all Tomcat versions including Tomcat 6.
The fix is to set the following JVM parameter:
And, just for completeness - if you need to specifiy JVM parameters for Tomcat, create a file called setenv.sh in your Tomcat's bin directory.
-Xms512m -Xmx512m \
-XX:PermSize=128m -XX:MaxPermSize=256m \
Tomcat will pick up the file automatically when it starts up. Regarding Permspace issues, there was a good discussion about it over at Matt Raible's Blog.