Java heap space error in tomcat 5.5

Hi,

I am running my application under Tomcat 5.5.16 on windows server as NT service and have run into an issue where I am getting the following message "java.lang.OutOfMemoryError: Java heap space".

I tried many options to increase this heap size (before I would get an OutOfMemoryException but now it is the "OutOfMemoryError: Java heap space" error.

What I have already tried :

1.

Defined environment variables:

JAVA_OPT=-client -server -Xms512M -Xmx512M

JAVA_OPTS=-client -server -Xms512M -Xmx512M

CATALINA_OPT=-client -server -Xms512M -Xmx512M

CATALINA_OPTS=-client -server -Xms512M -Xmx512M

2. ran tomcat5w.exe -Vmargs -Xmx512M but got an error message

3. added in the registry under -

HKEY_LOCAL_MACHINE

SOFTWARE

Apache Software Foundation

Procrun 2.0

Tomcat5

Parameters

Java

Add 4 variables:

JVM Option count = 3

JVM Option number 0 = -server

JVM Option number 1 = -Xms512m

JVM Option number 2 = -Xmx512m

** What else can be done ?

Thanks

[1104 byte] By [Ace1977a] at [2007-10-3 0:10:07]
# 1
Take a look at your code.Are you expecting it to use so much memory?Is there an endless loop creating huge variables and using all the memory needlessly?
evnafetsa at 2007-7-14 16:59:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Start your application from an ide (like eclipse) and use a profiler on it. It'll give you the memory usage details.ram.
Madathil_Prasada at 2007-7-14 16:59:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
I am having the same problem with heap space in tomcat 5.5. I had been using tomcat 4 without problems for a long time, but now I have upgraded to 5.5.15 I get out of memory errors. It is critial that I get this fixed. Does anyone have a solution?Thanks, Dan
dgrosscta at 2007-7-14 16:59:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...