Solved

Heap size on tomcat 6

Posted on 2009-04-03
9
1,653 Views
Last Modified: 2013-12-02
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.
0
Comment
Question by:w_serena
  • 3
  • 3
9 Comments
 
LVL 92

Accepted Solution

by:
objects earned 150 total points
ID: 24058130
add -Xmx1g to the JAVA_OPTS environemtn var
0
 
LVL 12

Expert Comment

by:Giant2
ID: 24058865
If you use ApacheTomcatMonitor you can easily set (like objects said before) in the menu "Configure" and tab "Java".
0
 

Author Comment

by:w_serena
ID: 24075264
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 92

Expert Comment

by:objects
ID: 24075345
> Where can I find that? I cannot find it in Control Panel --> System --> environment variables

add it

0
 

Author Comment

by:w_serena
ID: 24083914
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
 
LVL 92

Expert Comment

by:objects
ID: 24083949
try increasing it
how much ram do your webapps need?

0
 

Author Comment

by:w_serena
ID: 24084376
2GB. I increased it as mentiond above by setting -Xmx2g for JAVA_OPTS but server doesn't start if I do that
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
firstswap challenge 20 68
Groovy:unable to resolve class error 2 70
JUnit 4 @Before and @BeforeClass differences 3 48
HSSFWorkbook cannot be resolved error 10 50
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now