You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by abhishek jain <ab...@gmail.com> on 2011/03/21 09:01:53 UTC

Max value of MaxPermSize

hi friends,
I have to increase size of MaxPermSize by altering this line on catalina.sh
as i am having memory errors.

I wanted to know what is hte max size i can set as i have 3.5 GB RAM (on a
VPS) and most of this is free. i am runnign Centos , tomcat 5.5 .

if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then
  JAVA_OPTS="$JAVA_OPTS -server* -Xms1024M -Xmx1024M
-XX:MaxPermSize=2048M*-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


Pl. advice.
-- 
Thanks and kind Regards,
Abhishek jain

Re: Max value of MaxPermSize

Posted by Igor Cicimov <ic...@gmail.com>.
What kind of memory errors do you have? I have never seen application that
uses 2GB of permanent memory. Usually if you have "out of memory" errors you
need to increase the -Xmx1024M and not the permanent memory size. In your
setting you have given the JVM heap only 1GB and the permanent memory 2GB
which doesn't make sense to me. The perm size shouldn't be more than 500MB
or 1GB in the worst case and I'm talking from my experience with huge
production applications.

How much memory? I think you have answered that question your self - if you
have 3.5GB and it's free than give it all to the JVM, especially if it is
the only process running on the box. Basically any 32 bit process can grow
up to 4GB. But  over 3GB can create some problem in troubleshooting big core
files so I would say start with -Xmx2048M and -XX:MaxPermSize=512M and see
how you go.

On Mon, Mar 21, 2011 at 9:14 PM, abhishek jain
<ab...@gmail.com>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.
> >
> Hi
> I have a feeling that i am writing in wrong place,
> setenv.sh dont exist in my system, do i need to create that or can i write
> directly in catalina.sh, if yes where to place this configuration.
>
>
> --
> Thanks and kind Regards,
> Abhishek jain
>

Re: Max value of MaxPermSize

Posted by André Warnier <aw...@ice-sa.com>.
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.
>>
> Hi
> I have a feeling that i am writing in wrong place,
> setenv.sh dont exist in my system, do i need to create that or can i write
> directly in catalina.sh, if yes where to place this configuration.
> 
> 

Hey, this is Open Source, and this mailing list is manned by volunteers who try to help 
other people to the extent of their own knowledge.
But it means that you also are supposed to make some effort at finding and reading the 
on-line documentation, and even scripts and code if necessary.


In catalina.sh, there is this section :


if [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then
   . "$CATALINA_BASE"/bin/setenv.sh
elif [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
   . "$CATALINA_HOME"/bin/setenv.sh
fi

It means that it looks there, and *if it exists*, runs it in the context of the current 
script. (*)

Apart from that, and about your basic problem : my own recommendation would be to start by 
*removing* all these extra command-line switches about memory allocation etc.., and give a 
chance to the JVM default settings.  They have been carefully chosen by experts, to cover 
the majority of reasonable cases.
*Then*, if you still have a problem, try to identify where the problem is, instead of 
starting to poke left and right with settings that you may not fully understand.

(I have about 10 Tomcat servers running with *no* -XX:MaxPermSize and with -Xms256M 
-Xmx256M, and they are doing fine. Of course your *applications* are different.)


(*) Since what you seem to be running is a third-party repackaged Tomcat, it may or may 
not even run the catalina.sh script.  That is something you would have to find out. There 
is no easy way for people on this list to tell for sure, as we do not know what the 
packager has done.

You should also check if the system itself is a 32-bit or 64-bit system, and check what 
JVM you are running on it (32-bit or 64-bit). That also matters for knowing how much 
memory you /can/ allocate to the JVM.
(And note that this still relates to the java JVM, not to Tomcat per se).


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Max value of MaxPermSize

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Monday, April 04, 2011 9:43 AM
> To: Tomcat Users List
> Subject: Re: Max value of MaxPermSize
> 
> On 04/04/2011 15:40, Jeffrey Janner wrote:
> > Some of the answer below may be off.  I was reading an IBM doc that
> "quoted" a sun doc that said permgen is part of heap.
> > Jconsole lists it as non-heap.
> 
> Process heap != Java object heap
> 
> When you see heap in in any JVM related context you need to be sure
> which it is referring to. It isn't always clear.
> 
> Mark

Yea, my mis-read.  Guess my brain hasn't fully recovered from the thrashing it took trying to restore one of my root drivesv last week.
	
__________________________________________________________________________

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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Max value of MaxPermSize

Posted by Mark Thomas <ma...@apache.org>.
On 04/04/2011 15:40, Jeffrey Janner wrote:
> Some of the answer below may be off.  I was reading an IBM doc that "quoted" a sun doc that said permgen is part of heap.
> Jconsole lists it as non-heap.

Process heap != Java object heap

When you see heap in in any JVM related context you need to be sure
which it is referring to. It isn't always clear.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Max value of MaxPermSize

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com] 
> Subject: RE: Max value of MaxPermSize

> I was reading an IBM doc that "quoted" a sun doc that said 
> permgen is part of heap.

Which does not mean that it's included in the -Xmx settting, just that all the heap components are ... heaps.

> Also check that you have enough user-space memory left to 
> allocate an entire GB to Tomcat.

The OP stated the VM had 3.5 GB, but has failed to indicate whether or not he's using a 32- or 64-bit JVM.  If it's only 32-bit, he's not going to get far enough to use much of the 3.5 GB.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Max value of MaxPermSize

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
Some of the answer below may be off.  I was reading an IBM doc that "quoted" a sun doc that said permgen is part of heap.
Jconsole lists it as non-heap.
Also check that you have enough user-space memory left to allocate an entire GB to Tomcat.

> -----Original Message-----
> From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com]
> Sent: Monday, April 04, 2011 9:30 AM
> To: 'Tomcat Users List'
> Subject: RE: Max value of MaxPermSize
> 
> 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.netjain@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 <
> > chris@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

__________________________________________________________________________

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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Max value of MaxPermSize

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com] 
> Subject: RE: Max value of MaxPermSize

> Do you have any idea why he's having issues?
 
Can't tell - the OP has provided no useful information, and instead of doing some analysis, appears to be taking a shotgun approach to problem solving.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Max value of MaxPermSize

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
Yea, Chuck, I had qualms about the statement, but had found the exact words in a doc.
I sent a retraction while this came in.  Sorry about continuing the confusion.
Do you have any idea why he's having issues?  My bet is he's out of allocatable user-space in his OS vm.

> -----Original Message-----
> From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
> Sent: Monday, April 04, 2011 9:38 AM
> To: Tomcat Users List
> Subject: RE: Max value of MaxPermSize
> 
> > From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com]
> > Subject: RE: Max value of MaxPermSize
> 
> > The permgen is actually a section of the heap.
> 
> Not really true.
> 
> > So if you want a 1GB permgen, you'll need at least
> > a 1GB heap size
> 
> Definitely not true.  Although PermGen is managed as a heap, it is
> sized independently of the main heap; the -Xmx size emphatically does
> NOT include space for PermGen.  PermGen and the main heap are allocated
> contiguously (in virtual space), but the sizes are unrelated.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
> PROPRIETARY MATERIAL and is thus for use only by the intended
> recipient. If you received this in error, please contact the sender and
> delete the e-mail and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

__________________________________________________________________________

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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Max value of MaxPermSize

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com] 
> Subject: RE: Max value of MaxPermSize

> The permgen is actually a section of the heap.

Not really true.

> So if you want a 1GB permgen, you'll need at least 
> a 1GB heap size

Definitely not true.  Although PermGen is managed as a heap, it is sized independently of the main heap; the -Xmx size emphatically does NOT include space for PermGen.  PermGen and the main heap are allocated contiguously (in virtual space), but the sizes are unrelated.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Max value of MaxPermSize

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
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.netjain@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 <
> chris@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Max value of MaxPermSize

Posted by abhishek jain <ab...@gmail.com>.
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 <
chris@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-----
>
>

Re: Max value of MaxPermSize

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Max value of MaxPermSize

Posted by abhishek jain <ab...@gmail.com>.
> > 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.
>
Hi
I have a feeling that i am writing in wrong place,
setenv.sh dont exist in my system, do i need to create that or can i write
directly in catalina.sh, if yes where to place this configuration.


-- 
Thanks and kind Regards,
Abhishek jain

Re: Max value of MaxPermSize

Posted by Francis GALIEGUE <fg...@one2team.com>.
On Mon, Mar 21, 2011 at 10:24, abhishek jain <ab...@gmail.com> wrote:
[...]
> what should be the appropriate settings, and on what basis should i select
> them, i want max memory given to java.
>

You cannot really know offhand what permgen size you'll need. If you
use a recent enough Sun JVM, however, you'll be able to have it
dynamically size the heap size by using the -XX:+AggressiveHeap
startup option. Unfortunately, it cannot dynamically size permgen the
way it does heap :/

> 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.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Max value of MaxPermSize

Posted by abhishek jain <ab...@gmail.com>.
On Mon, Mar 21, 2011 at 2:40 PM, Mark Thomas <ma...@apache.org> wrote:

> On 21/03/2011 08:01, abhishek jain wrote:
> > hi friends,
> > I have to increase size of MaxPermSize by altering this line on
> catalina.sh
> > as i am having memory errors.
>
> Those settings look very, very odd.
>
> hi,
what should be the appropriate settings, and on what basis should i select
them, i want max memory given to java.


also am i writing these values in the correct location,

thanks
abhi

Re: Max value of MaxPermSize

Posted by Mark Thomas <ma...@apache.org>.
On 21/03/2011 08:01, abhishek jain wrote:
> hi friends,
> I have to increase size of MaxPermSize by altering this line on catalina.sh
> as i am having memory errors.

Those settings look very, very odd.

> I wanted to know what is hte max size i can set as i have 3.5 GB RAM (on a
> VPS) and most of this is free. i am runnign Centos , tomcat 5.5 .

That will be in the documentation for your JVM.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org