Re: OutOfMemoryError some time on some tomcat!!!!1

2010-11-23 Thread xu cheng
 hi, Chuck.Caldarale
I referenced to these two links
http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java
http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded
and do as the blog tolds, but failed to find the reason of the oom of my
app...
thanks though..

by the way, do you have the the jhat the articals mentioned? I went to the
jdk/bin,
but the jhat there seems not work as the author mentioned.




2010/11/23 Daniel Baktiar dbakt...@gmail.com

 hi charles,

 please allow me to disagree to that hanging onto reference as the main
 issue.

 permgen space is garbage collector's specific issue, not general hanging
 onto reference issue. it is caused by redeployment, which is the metadata
 for classes, marked to be permanent generation by the hotspot garbage
 collector. when you deploy new classes, the class loader will introduce
 memory usages that will also marked as permanent generation.

 permgen is oracle hotspot specific implementation issue. you won't get it
 when you run on oracle jrockit (which performs just in time compilation),
 for example.
 ---
 daniel baktiar
 http://savinggaia.tritiumapps.com - saving the planet is everyone's
 business!




 On 23 November 2010 14:10, Caldarale, Charles R
 chuck.caldar...@unisys.comwrote:

   From: xu cheng [mailto:xcheng@gmail.com]
   Subject: Re: OutOfMemoryError some time on some tomcat1
 
   I just kept redeploying apps , and the perm gen keep
   growing each time I deploy the same app. and when I
   undeploy the app, the perm gen didn't clean the garbage
 
  Exactly the situation I suggested the other day: you have something
 that's
  hanging onto a reference to an object from your webapp classes,
 preventing
  the old webapp deployment from being garbage collected.  Again, read
 this:
 
  http://wiki.apache.org/tomcat/FAQ/Memory
 
  Also, take a look at these:
 
  http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java
  http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded
 
   - 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.
 
 



the memory puzzle me....

2010-11-23 Thread xu cheng
hi;
I oberved the heap of the jvm which runs tomcat without deploying any
webapp.
and it's some kind like this   /|/|/|/|/|/|   when the used heap goes up,
there is a memory
use of the heap, maybe allocation for the new class instances, and when it
goes down ,
there is a gc, am I right?

but I didn't deploy any app on the tomcat. I'm just wondering what is using
the memory?

best regards


Re: the memory puzzle me....

2010-11-23 Thread xu cheng
thanks,
by the way, the permanent generation is also collected by major gc?
and what will trigger a gc in the permanent generation
 best regards

2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]
  Subject: the memory puzzle me

  I oberved the heap of the jvm which runs tomcat without deploying
  any webapp.  and it's some kind like this   /|/|/|/|/|/|

 That's called a sawtooth pattern, and is what you should be seeing.

  when the used heap goes up, there is a memory use of the heap,
  maybe allocation for the new class instances, and when it goes
  down , there is a gc, am I right?

 Yes; the GC you're seeing is very likely what's called a minor GC, which
 cleans out only the young generation, which is where nearly all objects are
 created and the vast majority die.  A major GC will process not only the
 young generation, but also the tenured (old) and so-called permanent ones.
  (Note that most things in the perm gen space are not actually permanent,
 and not necessarily even long-lived.)

  but I didn't deploy any app on the tomcat. I'm just wondering
  what is using the memory?

 Tomcat has numerous background threads doing such things as waiting for
 connections from clients, checking for webapp deployments, monitoring
 changes to deployed webapps, etc.  All of these are creating a few objects
 for very short periods, over and over.

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




Re: the memory puzzle me....

2010-11-23 Thread xu cheng
thanks very much
you help me alog

by the way, do you know *any tool that can monitor the permanent
generation*, such what's now resident in the perm gen?

I know that in the linux the jmap -permheap pid will display something,
like this
class_loaderclassesbytesparent_loaderalive?type

bootstrap11874691664  null  liveinternal
0x84747550118080x846017d8dead
sun/reflect/delegatingclassloa...@0x937f35f8
0x84685ee0118000x846017d8dead
sun/reflect/delegatingclassloa...@0x937f35f8
0x84686030117920x846017d8dead
sun/reflect/delegatingclassloa...@0x937f35f8
0x84686210117920x846017d8dead
sun/reflect/delegatingclassloa...@0x937f35f8

it seems useless for me actually (I 'm new learning about this) cos the
permanent gen occupy about 20MB and jmap list about 10 live class with 30
dead ones, I was confused with this

I used some other profiler tools but they just show* how much* perm gen was
used, but not *what they are used for*

thanks
best regards

2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]
  Subject: Re: the memory puzzle me

  the permanent generation is also collected by major gc?

 Correct.

  what will trigger a gc in the permanent generation

 When either the tenured or the permanent generation is full, someone calls
 System.gc(), or you click the Perform GC button in JConsole (or its
 equivalent in other profilers).

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




Re: the memory puzzle me....

2010-11-23 Thread xu cheng
thanks!!! you really help me a lot!

someone knows how to figure out how much permanent gen my vm is using?

2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]
  Subject: Re: the memory puzzle me

  by the way, do you know *any tool that can monitor the permanent
  generation*, such what's now resident in the perm gen?

 I presume you mean on Windows, since you already found one for Linux.  I
 suspect the more sophisticated profilers like YourKit will do it, but I'm
 not sure.  Others on the list use YourKit regularly, so they might be able
 to be more definitive when they wake up in an hour or two.

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




Re: the memory puzzle me....

2010-11-23 Thread xu cheng
I got it
jmap -heap
will print many things

2010/11/24 xu cheng xcheng@gmail.com

 thanks!!! you really help me a lot!

 someone knows how to figure out how much permanent gen my vm is using?

 2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]

  Subject: Re: the memory puzzle me

  by the way, do you know *any tool that can monitor the permanent
  generation*, such what's now resident in the perm gen?

 I presume you mean on Windows, since you already found one for Linux.  I
 suspect the more sophisticated profilers like YourKit will do it, but I'm
 not sure.  Others on the list use YourKit regularly, so they might be able
 to be more definitive when they wake up in an hour or two.

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





Re: the memory puzzle me....

2010-11-23 Thread xu cheng
hi:
thanks for replying

the jvisualvm does show the capacity and the used of the perm gen that the
vm use *currently*
but not the size of the vm* configuration*: PermSize   and   MaxPermSize

in my opinion , the MaxPermSize is the size that the perm gen is *allowed to
expand to*, and the PermSize is the size that allocated when the vm*initially
*started. and the capacity is the size that allocated to the vm* currently*.
am I right? thanks

by the way, I connect to a server remotely , there is only character
interface for me

best regards



2010/11/24 Blair Zajac bl...@orcaware.com

 You should check out jvisualvm which comes with any recent HotSpot JVM.  I
 don't have a copy available on the laptop I'm on right now, but by looking
 at the screenshots, it looks like it shows the permanent generation:


 http://wiki.oracle.com/page/How+to+use+JConsole,+JVisualVM+or+VisualVM+with+Oracle+Application+Server

 Blair


 On Nov 23, 2010, at 9:54 PM, xu cheng wrote:

  thanks!!! you really help me a lot!

 someone knows how to figure out how much permanent gen my vm is using?

 2010/11/24 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]
 Subject: Re: the memory puzzle me


  by the way, do you know *any tool that can monitor the permanent
 generation*, such what's now resident in the perm gen?


 I presume you mean on Windows, since you already found one for Linux.  I
 suspect the more sophisticated profilers like YourKit will do it, but I'm
 not sure.  Others on the list use YourKit regularly, so they might be
 able
 to be more definitive when they wake up in an hour or two.

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




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




Re: OutOfMemoryError some time on some tomcat!!!!1

2010-11-22 Thread xu cheng
hi Daniel
thanks alot for replying.

I don't know how to figure out how much the param MaxPermSize is set to. may
be it's set to be default. I just set the xmx and xms, so I thought that the
memory will absolutely enough, I didn't
notice this param, my fault.

I did an experiment on tomcat , I just kept redeploying apps , and the perm
gen keep growing each time I deploy the same app. and when I undeploy the
app, the perm gen didn't clean the garbage
( I think they are garbage, but I don't know whether the vm can figure it
out, I monitor this with the
jconsole in the jdk/bin). in the meanwhile , the code cache in the memory
pool and the loaded classes grow with the same curve like the permanent
generation. the unused class meta data wasn't cleaned up during each
deployment.

I always redeploy the  apps with shutting down the server, I think that
might be the point.

by the way , this aritical help me a lot to understand it.
http://blogs.sun.com/jonthecollector/entry/presenting_the_permanent_generation

thanks again for helping

2010/11/23 Daniel Baktiar dbakt...@gmail.com

 hi xu cheng,

 having a powerful machine with big memory is good. but don't assume that
 everything will be used automatically.
 the jvm doesn't automatically use all the resources in your memory when you
 start tomcat. you need to configure it.
 try to add something like this:
 *CATALINA_OPTS=-XX:MaxPermSize=512m *
 inside your catalina.sh (linux/unix) or catalina.bat (windows).
 you can put this as the first line (after the comments, for example).

 try to run again and see whether you still have the same error(s).

 PermGen space is the permanent generational heap for storing data such as
 class data. you will bump into this when deploying a large application or
 deploying repetitively. you will still get the exception when deploying
 often, only less frequent.
 ---
 daniel baktiar
 http://savinggaia.tritiumapps.com - saving the planet is everyone's
 business!




 2010/11/22 xu cheng xcheng@gmail.com

  after tracing the app with jprofiler for several hours , I still cannot
  figure the problem.
  it seems that the app doesn't use  a lot of memory.
  and it still run pretty well in my computer.and after it is deployed in
 the
  server, it crash
  the problem of the environment? but the tomcat on the server has been
  running for a really long time with out any problem
  what's the point?.oh no   (°ο°)
 
  2010/11/22 xu cheng xcheng@gmail.com
 
   by the way,
   it doesn't throws this exception while running on my computer
   it is only when the app is deploy on another computer that this problem
   occur
  
   2010/11/22 xu cheng xcheng@gmail.com
  
   hi:
   thanks for replying
   the app is running on a powerful server and the memory is suppose to
 be
   enough
   I'll check if there is a memory leak,(althouth the app is suppose to
 use
   only a few memory)
   thanks
  
   2010/11/22 Caldarale, Charles R chuck.caldar...@unisys.com
  
From: xu cheng [mailto:xcheng@gmail.com]
Subject: OutOfMemoryError some time on some tomcat1
  
the app works pretty well on my pc, and the tomcat
is apache-tomcat-6.0.29
however , when I put this app on to another computer
with the same tomcat it throws this exception
Java HotSpot(TM) 64-Bit Server VM warning: Exception
java.lang.OutOfMemoryError
  
Exception in thread http-8080-24
java.lang.OutOfMemoryError: PermGen space
  
   64-bit JVMs often require larger heap sizes than 32-bit ones.  If the
   error occurs on the first deployment of the app, you may just need to
   configure a larger PermGen.  However, if this error occurs only after
   redeploying your app some number of times, you likely have a memory
  leak.
Use any of the widely available profilers or heap analysis tools to
  see
   just what is consuming memory.  You can get some pointers here:
  
   http://wiki.apache.org/tomcat/FAQ/Memory
  
- 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-unsubscr...@tomcat.apache.org
   For additional commands, e-mail: users-h...@tomcat.apache.org
  
  
  
  
 



Re: OutOfMemoryError some time on some tomcat!!!!1

2010-11-22 Thread xu cheng
ps:
after several times of redeployment,
java.lang.OutOfMemoryError: PermGen space comes up.
I always redeploy the  apps *without* shutting down the server

在 2010年11月23日 下午1:50,xu cheng xcheng@gmail.com写道:

 hi Daniel
 thanks alot for replying.

 I don't know how to figure out how much the param MaxPermSize is set to.
 may be it's set to be default. I just set the xmx and xms, so I thought that
 the memory will absolutely enough, I didn't
 notice this param, my fault.

 I did an experiment on tomcat , I just kept redeploying apps , and the perm
 gen keep growing each time I deploy the same app. and when I undeploy the
 app, the perm gen didn't clean the garbage
 ( I think they are garbage, but I don't know whether the vm can figure it
 out, I monitor this with the
 jconsole in the jdk/bin). in the meanwhile , the code cache in the memory
 pool and the loaded classes grow with the same curve like the permanent
 generation. the unused class meta data wasn't cleaned up during each
 deployment.

 I always redeploy the  apps with shutting down the server, I think that
 might be the point.

 by the way , this aritical help me a lot to understand it.

 http://blogs.sun.com/jonthecollector/entry/presenting_the_permanent_generation

 thanks again for helping

 2010/11/23 Daniel Baktiar dbakt...@gmail.com

 hi xu cheng,

 having a powerful machine with big memory is good. but don't assume that
 everything will be used automatically.
 the jvm doesn't automatically use all the resources in your memory when
 you
 start tomcat. you need to configure it.
 try to add something like this:
 *CATALINA_OPTS=-XX:MaxPermSize=512m *
 inside your catalina.sh (linux/unix) or catalina.bat (windows).
 you can put this as the first line (after the comments, for example).

 try to run again and see whether you still have the same error(s).

 PermGen space is the permanent generational heap for storing data such as
 class data. you will bump into this when deploying a large application or
 deploying repetitively. you will still get the exception when deploying
 often, only less frequent.
 ---
 daniel baktiar
 http://savinggaia.tritiumapps.com - saving the planet is everyone's
 business!




 2010/11/22 xu cheng xcheng@gmail.com

  after tracing the app with jprofiler for several hours , I still cannot
  figure the problem.
  it seems that the app doesn't use  a lot of memory.
  and it still run pretty well in my computer.and after it is deployed in
 the
  server, it crash
  the problem of the environment? but the tomcat on the server has been
  running for a really long time with out any problem
  what's the point?.oh no   (°ο°)
 
  2010/11/22 xu cheng xcheng@gmail.com
 
   by the way,
   it doesn't throws this exception while running on my computer
   it is only when the app is deploy on another computer that this
 problem
   occur
  
   2010/11/22 xu cheng xcheng@gmail.com
  
   hi:
   thanks for replying
   the app is running on a powerful server and the memory is suppose to
 be
   enough
   I'll check if there is a memory leak,(althouth the app is suppose to
 use
   only a few memory)
   thanks
  
   2010/11/22 Caldarale, Charles R chuck.caldar...@unisys.com
  
From: xu cheng [mailto:xcheng@gmail.com]
Subject: OutOfMemoryError some time on some tomcat1
  
the app works pretty well on my pc, and the tomcat
is apache-tomcat-6.0.29
however , when I put this app on to another computer
with the same tomcat it throws this exception
Java HotSpot(TM) 64-Bit Server VM warning: Exception
java.lang.OutOfMemoryError
  
Exception in thread http-8080-24
java.lang.OutOfMemoryError: PermGen space
  
   64-bit JVMs often require larger heap sizes than 32-bit ones.  If
 the
   error occurs on the first deployment of the app, you may just need
 to
   configure a larger PermGen.  However, if this error occurs only
 after
   redeploying your app some number of times, you likely have a memory
  leak.
Use any of the widely available profilers or heap analysis tools to
  see
   just what is consuming memory.  You can get some pointers here:
  
   http://wiki.apache.org/tomcat/FAQ/Memory
  
- 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-unsubscr...@tomcat.apache.org
   For additional commands, e-mail: users-h...@tomcat.apache.org
  
  
  
  
 





Re: OutOfMemoryError some time on some tomcat!!!!1

2010-11-22 Thread xu cheng
hi:
thanks for the references. I 'll read that.
by the way,
*hanging onto a reference to an object from your webapp classes, preventing
the old webapp deployment from being garbage collected. *

what kind of object do you mean by saying this? classes relevant to the
class loader? or something else? for example?
thanks


2010/11/23 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]
  Subject: Re: OutOfMemoryError some time on some tomcat1

  I just kept redeploying apps , and the perm gen keep
  growing each time I deploy the same app. and when I
  undeploy the app, the perm gen didn't clean the garbage

 Exactly the situation I suggested the other day: you have something that's
 hanging onto a reference to an object from your webapp classes, preventing
 the old webapp deployment from being garbage collected.  Again, read this:

 http://wiki.apache.org/tomcat/FAQ/Memory

 Also, take a look at these:

 http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java
 http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded

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




OutOfMemoryError some time on some tomcat!!!!1

2010-11-21 Thread xu cheng
hi:
 I've wrote an app with jsp and servlet, and I used four libs

commons.logging
common.httpclient
jdom
commons.codec

the app works pretty well on my pc, and the tomcat is apache-tomcat-6.0.29
however , when I put this app on to another computer with the same tomcat
it throws this exception
Java HotSpot(TM) 64-Bit Server VM warning: Exception
java.lang.OutOfMemoryError occurred dispatching signal SIGTERM to
handler- the VM may need to be forcibly terminated
it seems the exception of the jvm rather the tomcat.

and some times like this
Deploying web application archive XXX.war
Exception in thread http-8080-24 java.lang.OutOfMemoryError: PermGen space
Exception in thread http-8080-14 java.lang.OutOfMemoryError: PermGen space
Exception in thread http-8080-2 java.lang.OutOfMemoryError: PermGen space


and the memory is absolutely enough
maybe it's my app's fault, but I cannot find it..


does anyone have had this kind of problem?
or any suggestions ?
thanks


Re: OutOfMemoryError some time on some tomcat!!!!1

2010-11-21 Thread xu cheng
hi:
thanks for replying
the app is running on a powerful server and the memory is suppose to be
enough
I'll check if there is a memory leak,(althouth the app is suppose to use
only a few memory)
thanks

2010/11/22 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]
  Subject: OutOfMemoryError some time on some tomcat1

  the app works pretty well on my pc, and the tomcat
  is apache-tomcat-6.0.29
  however , when I put this app on to another computer
  with the same tomcat it throws this exception
  Java HotSpot(TM) 64-Bit Server VM warning: Exception
  java.lang.OutOfMemoryError

  Exception in thread http-8080-24
  java.lang.OutOfMemoryError: PermGen space

 64-bit JVMs often require larger heap sizes than 32-bit ones.  If the error
 occurs on the first deployment of the app, you may just need to configure a
 larger PermGen.  However, if this error occurs only after redeploying your
 app some number of times, you likely have a memory leak.  Use any of the
 widely available profilers or heap analysis tools to see just what is
 consuming memory.  You can get some pointers here:

 http://wiki.apache.org/tomcat/FAQ/Memory

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




Re: OutOfMemoryError some time on some tomcat!!!!1

2010-11-21 Thread xu cheng
by the way,
it doesn't throws this exception while running on my computer
it is only when the app is deploy on another computer that this problem
occur

2010/11/22 xu cheng xcheng@gmail.com

 hi:
 thanks for replying
 the app is running on a powerful server and the memory is suppose to be
 enough
 I'll check if there is a memory leak,(althouth the app is suppose to use
 only a few memory)
 thanks

 2010/11/22 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]
  Subject: OutOfMemoryError some time on some tomcat1

  the app works pretty well on my pc, and the tomcat
  is apache-tomcat-6.0.29
  however , when I put this app on to another computer
  with the same tomcat it throws this exception
  Java HotSpot(TM) 64-Bit Server VM warning: Exception
  java.lang.OutOfMemoryError

  Exception in thread http-8080-24
  java.lang.OutOfMemoryError: PermGen space

 64-bit JVMs often require larger heap sizes than 32-bit ones.  If the
 error occurs on the first deployment of the app, you may just need to
 configure a larger PermGen.  However, if this error occurs only after
 redeploying your app some number of times, you likely have a memory leak.
  Use any of the widely available profilers or heap analysis tools to see
 just what is consuming memory.  You can get some pointers here:

 http://wiki.apache.org/tomcat/FAQ/Memory

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





Re: OutOfMemoryError some time on some tomcat!!!!1

2010-11-21 Thread xu cheng
after tracing the app with jprofiler for several hours , I still cannot
figure the problem.
it seems that the app doesn't use  a lot of memory.
and it still run pretty well in my computer.and after it is deployed in the
server, it crash
the problem of the environment? but the tomcat on the server has been
running for a really long time with out any problem
what's the point?.oh no   (°ο°)

2010/11/22 xu cheng xcheng@gmail.com

 by the way,
 it doesn't throws this exception while running on my computer
 it is only when the app is deploy on another computer that this problem
 occur

 2010/11/22 xu cheng xcheng@gmail.com

 hi:
 thanks for replying
 the app is running on a powerful server and the memory is suppose to be
 enough
 I'll check if there is a memory leak,(althouth the app is suppose to use
 only a few memory)
 thanks

 2010/11/22 Caldarale, Charles R chuck.caldar...@unisys.com

  From: xu cheng [mailto:xcheng@gmail.com]
  Subject: OutOfMemoryError some time on some tomcat1

  the app works pretty well on my pc, and the tomcat
  is apache-tomcat-6.0.29
  however , when I put this app on to another computer
  with the same tomcat it throws this exception
  Java HotSpot(TM) 64-Bit Server VM warning: Exception
  java.lang.OutOfMemoryError

  Exception in thread http-8080-24
  java.lang.OutOfMemoryError: PermGen space

 64-bit JVMs often require larger heap sizes than 32-bit ones.  If the
 error occurs on the first deployment of the app, you may just need to
 configure a larger PermGen.  However, if this error occurs only after
 redeploying your app some number of times, you likely have a memory leak.
  Use any of the widely available profilers or heap analysis tools to see
 just what is consuming memory.  You can get some pointers here:

 http://wiki.apache.org/tomcat/FAQ/Memory

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






Re: the tomcat encoding

2010-11-16 Thread xu cheng
hi:
thanks, the problem is that my tomcat interact with other server and the
server use somekind of encoding that is different.
and after the encoding is transfered .it works now
thanks

2010/11/17 Christopher Schultz ch...@christopherschultz.net

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Rob,

 On 11/16/2010 4:31 AM, Rob Gregory wrote:
  I also use a filter to set the following:-
 
  request.setCharacterEncoding(UTF-8);
  response.setContentType(text/html; charset=UTF-8);
  response.setCharacterEncoding(UTF-8);

 FWIW, you shouldn't override any character encoding sent by the client.
 If there is no encoding, feel free to default to UTF-8.

  Within the final html output I always include the following meta tag:-
  meta http-equiv=Content-Type content=text/xhtml;
  charset=utf-8/meta

 This only makes sense if the response is actually in UTF-8. I would
 recommend something like this:

 meta http-equiv=Content-Type content=text/xhtml;
 charset={response.characterEncoding} /

 http://wiki.apache.org/tomcat/FAQ/CharacterEncoding

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkzi2RQACgkQ9CaO5/Lv0PBlaQCeOMxcnhPuX4hV/TPHT94+tmaM
 oyMAoKR87o0U7voSaQ0OiUg9useP/aGJ
 =O2Sy
 -END PGP SIGNATURE-

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




the tomcat encoding

2010-11-15 Thread xu cheng
hi all:
I wrote an app and there are some chinese content, and there are some code
like this

str = new String(chineseContentString.getBytes(iso-8859-1), utf-8);

the app runs pretty well in the tomcat of my pc. however ,when it was
deployed in other machine.
all the Chinese content becomes messy code.

so ,does anyone know how to got to encoding of the tomcat. or it was just
iso-8859-1 and cannot be changed?

thanks
by the way , the edition is 6.0.20