Solved

Tomcat memory setting in windows

Posted on 2006-10-20
8
5,967 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 25 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 25 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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

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 video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

626 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