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

x
?
Solved

Tomcat memory setting in windows

Posted on 2006-10-20
8
Medium Priority
?
5,969 Views
Last Modified: 2010-05-18
w2k, and tomcat 5.5. the server has 4 GB RAM.  JVM/Tomcat set to use 1048 MB, and I still gets:
Oct 20, 2006 10:49:19 AM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
SEVERE: Caught exception (java.lang.OutOfMemoryError: PermGen space) executing org.apache.tomcat.util.net.LeaderFollowerWorkerThread@159611, terminating thread
Oct 20, 2006 10:49:19 AM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
SEVERE: Caught exception (java.lang.OutOfMemoryError: PermGen space) executing org.apache.tomcat.util.net.LeaderFollowerWorkerThread@159611, terminating thread
Oct 20, 2006 10:59:18 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080

how much windows allow Java/Tomcat to get RAM?  how can get exact RAM size needed for Tomcat

Thanks
0
Comment
Question by:salasadi
[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
8 Comments
 
LVL 9

Accepted Solution

by:
shinobun earned 100 total points
ID: 17777976
You need to increase the PermGen size.  Add the following to the JAVA_OPTS or CATALINA_OPTS environment variable.

-XX:MaxPermSize=128m

http://java.sun.com/docs/hotspot/VMOptions.html#additional
0
 
LVL 3

Assisted Solution

by:KnightFire
KnightFire earned 100 total points
ID: 17787219
As shinobun has pointed out, you need to increase your perm space.
Perm space is the space that the VM uses to store objects that do not have a representation at the java level, for example, class defenitions etc. It is not part of the java heap (set using -mx etc) and needs to be set separately.

I can reccomend reading suns docs on garbage collection to get an understanding of how memory works.
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
0
 

Author Comment

by:salasadi
ID: 17787676
Thanks guys,
in tomcat 5 you can set the parameter from admin console for JVM and I set it toi 1 GB.  in older TC we used to do thios in registry.
0
 
LVL 9

Expert Comment

by:shinobun
ID: 18045592
Is your problem solved?  Have you tried our recommendations?

As KnightFire said, perm space is different from the heap size, and this might not be affected by the admin console.
0
 

Expert Comment

by:pensamex
ID: 22513939
This command is good or bad ?

JAVA_OPTS=$JAVA_OPTS -Xms64m -Xms512m -Xmx128m -Xmx512m -XX:PermSize=128m -XX:PermSize=256m
export JAVA_HOME="/usr/java/jdk1.5.0_04/"
export PATH=$PATH:$JAVA_HOME/bin
export CATALINA_HOME="/usr/local/apache-tomcat-5.5.20"
export TOMCAT_HOME="/usr/local/apache-tomcat-5.5.20"
export CLASSPATH=.
 
JAVA_OPTS=$JAVA_OPTS -Xms64m -Xms512m -Xmx128m -Xmx512m -XX:PermSize=128m -XX:PermSize=256m
 
/usr/local/apache-tomcat-5.5.20/bin/catalina.sh start

Open in new window

0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

705 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