Heap size on tomcat 6

I have Apache Tomcat 6 installed on my PC. If I deploy more than 2 applications in Tomcat, it starts giving me "Heap size: Out of memory" exception.

I have 4 GB RAM and windows XP OS.

Can someone please let me know how to increase the Heap Size.
w_serenaAsked:
Who is Participating?
 
objectsCommented:
add -Xmx1g to the JAVA_OPTS environemtn var
0
 
Giant2Commented:
If you use ApacheTomcatMonitor you can easily set (like objects said before) in the menu "Configure" and tab "Java".
0
 
w_serenaAuthor Commented:
Thanks a lot for replying.

>> add -Xmx1g to the JAVA_OPTS environemtn var

Where can I find that? I cannot find it in Control Panel --> System --> environment variables

>>If you use ApacheTomcatMonitor you can easily set (like objects said before) in the menu "Configure" and tab "Java".

How to use Apache tomcat Monitor? I think it comes in the sidebar once you install Tomcat. But I didn't install tomcat. I downloaded the zip from Apache site and upon unzipping started using it. There was no installation.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
objectsCommented:
> Where can I find that? I cannot find it in Control Panel --> System --> environment variables

add it

0
 
w_serenaAuthor Commented:
thanks a lot for replying.

I have made this setting. Still I am sometimes getting Out of Memory exception.

I tried setting the value as -Xmx2g for JAVA_OPTS, user variable. If I do that the tomcat server does not start.
shouldn't 2GB be acceptable when my system shows total RAM as 3.46 GB?
0
 
objectsCommented:
try increasing it
how much ram do your webapps need?

0
 
w_serenaAuthor Commented:
2GB. I increased it as mentiond above by setting -Xmx2g for JAVA_OPTS but server doesn't start if I do that
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.