Solved

Heap size on tomcat 6

Posted on 2009-04-03
9
1,652 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

707 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

15 Experts available now in Live!

Get 1:1 Help Now