Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Heap size on tomcat 6

Posted on 2009-04-03
9
Medium Priority
?
1,660 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 600 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

721 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