Solved

Heap size on tomcat 6

Posted on 2009-04-03
9
1,657 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
java mysql insert application 14 68
JDBC performance 8 35
Coding for the first time 9 104
Java List 4 76
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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 …
Suggested Courses

752 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