The permgen is actually a section of the heap. So if you want a 1GB permgen, you'll need at least a 1GB heap size, but you better make it much bigger than that, since you'll need more room for all the little things, like variable, objects, etc. If you really need that large of a permgen, then you should probably take a good look at your app to figure out why.
(Actually, you probably need only a little more than the default 128Mb of PermGen, but your heap doesn't have enough room to expand it. Try changing you settings below to -Xmx768m -XX:MaxPermSize:256m, and see if that helps.) > -----Original Message----- > From: abhishek jain [mailto:abhishek.netj...@gmail.com] > Sent: Monday, April 04, 2011 3:09 AM > To: Tomcat Users List > Cc: Christopher Schultz > Subject: Re: Max value of MaxPermSize > > hi, > I think the following line in > /usr/local/jakarta/apache-tomcat-5.5.28/bin/catalina.sh > > if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then > JAVA_OPTS="$JAVA_OPTS -server -Xms512m -Xmx512m -XX:MaxPermSize=1024m > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" > > LOGGING_CONFIG="- > Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties" > else > # Bugzilla 45585 > LOGGING_CONFIG="-Dnop" > fi > > > > is not making any differnece onthe memory consumed,as if i do > > # free -m > total used free shared buffers > cached > Mem: 3072 696 2375 0 0 > 0 > -/+ buffers/cache: 696 2375 > Swap: 0 0 0 > > > the used space is 696 mb, where as , it should allocate more than that > to > java itself, > > pl. advice how can i allocate more memory to java , as i am getting > permgenerrorof memory (OutOfMemoryError: PermGen space) > > thanks > abhi > > On Mon, Mar 21, 2011 at 8:03 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Abhishek, > > > > On 3/21/2011 6:14 AM, abhishek jain wrote: > > >>> also am i writing these values in the correct location, > > >> > > >> With the tomcat base startup scripts, this should be in > > >> $CATALINA_BASE/setenv.sh. This file will be sourced by catalina.sh > if > > >> it exists. > > >> > > > I have a feeling that i am writing in wrong place, setenv.sh dont > > > exist in my system, do i need to create that > > > > Yes, you can create it. It's better to create this file because it > won't > > be overwritten by any Tomcat upgrades you might perform in the > future. > > > > > or can i write directly in catalina.sh, if yes where to place this > > > configuration. > > > > You *can* put this into catalina.sh, but it would be better not to. > > > > - -chris > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.10 (MingW32) > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > > > iEYEARECAAYFAk2HYboACgkQ9CaO5/Lv0PBPLwCgkNB2NMLGWsIHanH7emroXs2C > > u88An2jZaM3mwkzRvQMTx7Eu0bCFeCDi > > =xNcw > > -----END PGP SIGNATURE----- > > > > __________________________________________________________________________ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org