Re: Out of memory exception

2021-02-19 Thread Christopher Schultz

Niranjan,

On 2/18/21 13:36, Niranjan Rao wrote:
First apologies for non tomcat question. I have seen that there is 
enough expertise here to provide hints and hints are what I am looking 
for to solve the problem and question is generic enough. I have tried 
researching problem to best of my abilities.


It all happens on Ubuntu 20.04 and JDK 15

We have a java program that regularly throws 
"java.lang.OutOfMemoryError: Java heap space" exception. Puzzling point 
is it happens only on one VM. We have a set of two VMs/boxes spawned 
from same AWS image. Machine class/region is exactly same and since they 
are from same image, they should be mostly identical except stuff like 
host name, ip address etc.


Number of tasks performed by VMs are comparable and not a significant 
difference. Yet, one VM never runs of out of memory and other one does. 
Sometimes it's as soon as half an hour after restarting the process 
while on the other box process is running for days and no issues.


I took memory dumps from both VMs and they look similar. Program is 
started with -Xmx1g flag and we have taken regular memory dumps. In many 
cases eclipse MAT reports total memory usage was less than 100MB when 
program crashed with out of memory exception.



Has anyone seen anything similar to this? Identical bits of code 
behaving differently? What else should I be looking for?


What is the load profile of each application/server? You said you aren't 
running Tomcat, but is load on each of the applications balanced in any 
way similar to how a web-application load-balancer would work? 
Sometimes, the answer is simply that one server is doing more work than 
the other.


We have two application servers which are "identical" except that only 
one of them handles our email queue.


Maybe though the "types" of tasks are the same for each server, one of 
them is getting unlucky and is handling a "big" task that fails each time?


Do you have any logging which would indicate which task, ro what kinds 
of tasks are failing?


Do you have a stack trace of the OOME? Do you have a bunch of them (from 
many separate events)? Do they all look the same?


The AWS images are the same, have you upgraded the OS on either one 
after initial launch, or do you always start fresh with the same image 
and no "apt-get update" on them. Same JVM and everything on each of them?


If you start with -Xmx1G then you should consider also using -Xms1G. IF 
you have a long-running process which you expect may take up 1G of heap 
space, go ahead and allocate it all at once instead of wasting time 
re-sizing the heap a bunch of times on your way up to 1G.


-chris

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



Re: Out of memory exception

2021-02-18 Thread Niranjan Rao

On 2/18/21 12:53 PM, Shawn Heisey wrote:

On 2/18/2021 12:11 PM, Niranjan Rao wrote:
Thank you the response. This is not a web application, but a 
standalone java program. Hence I said it's not a tomcat question, but 
a generic JVM question. I have been researching about this a lot and 
based on many mails on this list, lot of people here know about 
internal behavior of JVM and specs lot better than I do.


Apologies for getting that wrong.

Is it a custom app or something that you downloaded and installed?  
Talk to whoever wrote it.  They will hopefully know what information 
is needed to troubleshoot further.


Is Java 15 required for the application to function?  If you can 
successfully use Java 11 or even Java 8, you'll be dealing with a far 
more stable platform.  Major show-stopper bugs in Java are rare, but 
they do happen.  I will warn you that although I do recommend 
downgrading Java for stability purposes, I do not hold out a lot of 
hope that it will solve this problem.


Which garbage collector are you using?  I would recommend one of the 
really stable collectors, like G1.  I wrote this wiki page a long time 
ago that includes garbage collection information for Solr ... I think 
it would apply well to any application where latency is important than 
throughput:


https://cwiki.apache.org/confluence/display/SOLR/ShawnHeisey

Thanks,
Shawn

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

I tried talking to the author, myself - but not much luck. Anyways 
talking with self does not help with new ideas much ;)


We added lot of logging and wrote a simple throw away tool to analyze 
the logs. Even though task counts are similar, there were some time out 
errors that could be causing the leaks. Currently a patch is deployed 
and we are waiting to see if it has made any impact.


Interesting point was why is one machine getting brunt of bad things. 
May be we will drop the box and spawn another VM with the assumption 
that host could be heavily loaded or something similar not easily 
visible things going on.


Your blog entry is very informative. Thank you.


Regards,


Niranjan


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



Re: Out of memory exception

2021-02-18 Thread Shawn Heisey

On 2/18/2021 12:11 PM, Niranjan Rao wrote:
Thank you the response. This is not a web application, but a standalone 
java program. Hence I said it's not a tomcat question, but a generic JVM 
question. I have been researching about this a lot and based on many 
mails on this list, lot of people here know about internal behavior of 
JVM and specs lot better than I do.


Apologies for getting that wrong.

Is it a custom app or something that you downloaded and installed?  Talk 
to whoever wrote it.  They will hopefully know what information is 
needed to troubleshoot further.


Is Java 15 required for the application to function?  If you can 
successfully use Java 11 or even Java 8, you'll be dealing with a far 
more stable platform.  Major show-stopper bugs in Java are rare, but 
they do happen.  I will warn you that although I do recommend 
downgrading Java for stability purposes, I do not hold out a lot of hope 
that it will solve this problem.


Which garbage collector are you using?  I would recommend one of the 
really stable collectors, like G1.  I wrote this wiki page a long time 
ago that includes garbage collection information for Solr ... I think it 
would apply well to any application where latency is important than 
throughput:


https://cwiki.apache.org/confluence/display/SOLR/ShawnHeisey

Thanks,
Shawn

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



Re: Out of memory exception

2021-02-18 Thread Brian Wolfe
You need to monitor the JVM through something like visual VM or JConsole.
Monitor the heap space. Your gonna have to modify your code to help you
understand where the memory leak is occurring. The stack trace should give
you an idea of where in your code it is trying to allocate memory.

On Thu, Feb 18, 2021 at 2:12 PM Niranjan Rao  wrote:

> Hi Shawn
>
> Thank you the response. This is not a web application, but a standalone
> java program. Hence I said it's not a tomcat question, but a generic JVM
> question. I have been researching about this a lot and based on many
> mails on this list, lot of people here know about internal behavior of
> JVM and specs lot better than I do.
>
> Both the boxes are spawned from same AWS image, we build the image.
> There is no other difference. Both receive tasks over MQ.  Tasks could
> be slightly different - like for different users, number of entities
> user holds etc, but they should not be too different or kind of should
> average out in the long run. We have examined the data for the tasks and
> nothing unusual has come out so far.
>
> Regards,
>
> Niranjan
> On 2/18/21 10:59 AM, Shawn Heisey wrote:
>
> Regards,
>
> Niranjan
>
> > On 2/18/2021 11:36 AM, Niranjan Rao wrote:
> >> First apologies for non tomcat question. I have seen that there is
> >> enough expertise here to provide hints and hints are what I am
> >> looking for to solve the problem and question is generic enough. I
> >> have tried researching problem to best of my abilities.
> >
> > I believe you're right to think this isn't a tomcat question. There
> > are a lot of things it could be.  Tomcat is a *possible* source,
> > though I think the chance of that is low.  Without a LOT of info that
> > I would probably be useless at interpreting or asking for, it's
> > impossible to say for sure.
> >
> > With problems like this, it is normally the application running inside
> > Tomcat that has a problem, not Tomcat itself.  You're likely to get a
> > lot more useful information if you go to the people responsible for
> > those applications.
> >
> >> We have a java program that regularly throws
> >> "java.lang.OutOfMemoryError: Java heap space" exception. Puzzling
> >> point is it happens only on one VM. We have a set of two VMs/boxes
> >> spawned from same AWS image. Machine class/region is exactly same and
> >> since they are from same image, they should be mostly identical
> >> except stuff like host name, ip address etc.
> >>
> >> Number of tasks performed by VMs are comparable and not a significant
> >> difference. Yet, one VM never runs of out of memory and other one
> >> does. Sometimes it's as soon as half an hour after restarting the
> >> process while on the other box process is running for days and no
> >> issues.
> >
> > "Comparable" isn't "identical".
> >
> > Are they running the same apps?  Which apps are involved?  Is the one
> > that's throwing OOME handling substantially similar requests when
> > compared to one that doesn't?  Is the request rate nearly the same, or
> > is the problematic one handling a lot more?  Another applicable
> > question, also off topic for this mailing list:  Are the apps in both
> > cases configured identically?
> >
> >> I took memory dumps from both VMs and they look similar. Program is
> >> started with -Xmx1g flag and we have taken regular memory dumps. In
> >> many cases eclipse MAT reports total memory usage was less than 100MB
> >> when program crashed with out of memory exception.
> >
> > That's extremely odd, unless the application requested a REALLY big
> > chunk of memory such that the 100MB existing plus the new allocation
> > would be larger than the max heap size of 1GB.
> >
> > Do you have enough free memory that you could increase the max heap to
> > 2GB or beyond and see what happens?
> >
> >> Has anyone seen anything similar to this? Identical bits of code
> >> behaving differently? What else should I be looking for?
> >
> > Earlier you said "comparable" and now you're saying "identical". So I
> > have to ask ... which is it?  Remember that differences in
> > configurations, types of requests, and request load can lead to very
> > different requirements, even if the apps running inside Tomcat are the
> > same.
> >
> > Most of my experience in the Java world comes from Solr.  Apache Solr
> > is a servlet application, and ships with Jetty.  Tomcat is not usually
> > involved.  I joined this mail

Re: Out of memory exception

2021-02-18 Thread Robert Turner
Have you tried enabling heap dumps on OOM exceptions (
https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/clopts001.html
; HeapDumpOnOutOfMemoryError) and then looking at the heap dump? It should
help you identify where the allocated heap is going to, and give you some
ideas of where to look next.


On Thu, Feb 18, 2021 at 2:12 PM Niranjan Rao  wrote:

> Hi Shawn
>
> Thank you the response. This is not a web application, but a standalone
> java program. Hence I said it's not a tomcat question, but a generic JVM
> question. I have been researching about this a lot and based on many
> mails on this list, lot of people here know about internal behavior of
> JVM and specs lot better than I do.
>
> Both the boxes are spawned from same AWS image, we build the image.
> There is no other difference. Both receive tasks over MQ.  Tasks could
> be slightly different - like for different users, number of entities
> user holds etc, but they should not be too different or kind of should
> average out in the long run. We have examined the data for the tasks and
> nothing unusual has come out so far.
>
> Regards,
>
> Niranjan
> On 2/18/21 10:59 AM, Shawn Heisey wrote:
>
> Regards,
>
> Niranjan
>
> > On 2/18/2021 11:36 AM, Niranjan Rao wrote:
> >> First apologies for non tomcat question. I have seen that there is
> >> enough expertise here to provide hints and hints are what I am
> >> looking for to solve the problem and question is generic enough. I
> >> have tried researching problem to best of my abilities.
> >
> > I believe you're right to think this isn't a tomcat question. There
> > are a lot of things it could be.  Tomcat is a *possible* source,
> > though I think the chance of that is low.  Without a LOT of info that
> > I would probably be useless at interpreting or asking for, it's
> > impossible to say for sure.
> >
> > With problems like this, it is normally the application running inside
> > Tomcat that has a problem, not Tomcat itself.  You're likely to get a
> > lot more useful information if you go to the people responsible for
> > those applications.
> >
> >> We have a java program that regularly throws
> >> "java.lang.OutOfMemoryError: Java heap space" exception. Puzzling
> >> point is it happens only on one VM. We have a set of two VMs/boxes
> >> spawned from same AWS image. Machine class/region is exactly same and
> >> since they are from same image, they should be mostly identical
> >> except stuff like host name, ip address etc.
> >>
> >> Number of tasks performed by VMs are comparable and not a significant
> >> difference. Yet, one VM never runs of out of memory and other one
> >> does. Sometimes it's as soon as half an hour after restarting the
> >> process while on the other box process is running for days and no
> >> issues.
> >
> > "Comparable" isn't "identical".
> >
> > Are they running the same apps?  Which apps are involved?  Is the one
> > that's throwing OOME handling substantially similar requests when
> > compared to one that doesn't?  Is the request rate nearly the same, or
> > is the problematic one handling a lot more?  Another applicable
> > question, also off topic for this mailing list:  Are the apps in both
> > cases configured identically?
> >
> >> I took memory dumps from both VMs and they look similar. Program is
> >> started with -Xmx1g flag and we have taken regular memory dumps. In
> >> many cases eclipse MAT reports total memory usage was less than 100MB
> >> when program crashed with out of memory exception.
> >
> > That's extremely odd, unless the application requested a REALLY big
> > chunk of memory such that the 100MB existing plus the new allocation
> > would be larger than the max heap size of 1GB.
> >
> > Do you have enough free memory that you could increase the max heap to
> > 2GB or beyond and see what happens?
> >
> >> Has anyone seen anything similar to this? Identical bits of code
> >> behaving differently? What else should I be looking for?
> >
> > Earlier you said "comparable" and now you're saying "identical". So I
> > have to ask ... which is it?  Remember that differences in
> > configurations, types of requests, and request load can lead to very
> > different requirements, even if the apps running inside Tomcat are the
> > same.
> >
> > Most of my experience in the Java world comes from Solr.  Apache Solr
> > is a servlet application, and ships with Jetty.  Tomcat is not 

Re: Out of memory exception

2021-02-18 Thread Niranjan Rao

Hi Shawn

Thank you the response. This is not a web application, but a standalone 
java program. Hence I said it's not a tomcat question, but a generic JVM 
question. I have been researching about this a lot and based on many 
mails on this list, lot of people here know about internal behavior of 
JVM and specs lot better than I do.


Both the boxes are spawned from same AWS image, we build the image. 
There is no other difference. Both receive tasks over MQ.  Tasks could 
be slightly different - like for different users, number of entities 
user holds etc, but they should not be too different or kind of should 
average out in the long run. We have examined the data for the tasks and 
nothing unusual has come out so far.


Regards,

Niranjan
On 2/18/21 10:59 AM, Shawn Heisey wrote:

Regards,

Niranjan


On 2/18/2021 11:36 AM, Niranjan Rao wrote:
First apologies for non tomcat question. I have seen that there is 
enough expertise here to provide hints and hints are what I am 
looking for to solve the problem and question is generic enough. I 
have tried researching problem to best of my abilities.


I believe you're right to think this isn't a tomcat question. There 
are a lot of things it could be.  Tomcat is a *possible* source, 
though I think the chance of that is low.  Without a LOT of info that 
I would probably be useless at interpreting or asking for, it's 
impossible to say for sure.


With problems like this, it is normally the application running inside 
Tomcat that has a problem, not Tomcat itself.  You're likely to get a 
lot more useful information if you go to the people responsible for 
those applications.


We have a java program that regularly throws 
"java.lang.OutOfMemoryError: Java heap space" exception. Puzzling 
point is it happens only on one VM. We have a set of two VMs/boxes 
spawned from same AWS image. Machine class/region is exactly same and 
since they are from same image, they should be mostly identical 
except stuff like host name, ip address etc.


Number of tasks performed by VMs are comparable and not a significant 
difference. Yet, one VM never runs of out of memory and other one 
does. Sometimes it's as soon as half an hour after restarting the 
process while on the other box process is running for days and no 
issues.


"Comparable" isn't "identical".

Are they running the same apps?  Which apps are involved?  Is the one 
that's throwing OOME handling substantially similar requests when 
compared to one that doesn't?  Is the request rate nearly the same, or 
is the problematic one handling a lot more?  Another applicable 
question, also off topic for this mailing list:  Are the apps in both 
cases configured identically?


I took memory dumps from both VMs and they look similar. Program is 
started with -Xmx1g flag and we have taken regular memory dumps. In 
many cases eclipse MAT reports total memory usage was less than 100MB 
when program crashed with out of memory exception.


That's extremely odd, unless the application requested a REALLY big 
chunk of memory such that the 100MB existing plus the new allocation 
would be larger than the max heap size of 1GB.


Do you have enough free memory that you could increase the max heap to 
2GB or beyond and see what happens?


Has anyone seen anything similar to this? Identical bits of code 
behaving differently? What else should I be looking for?


Earlier you said "comparable" and now you're saying "identical". So I 
have to ask ... which is it?  Remember that differences in 
configurations, types of requests, and request load can lead to very 
different requirements, even if the apps running inside Tomcat are the 
same.


Most of my experience in the Java world comes from Solr.  Apache Solr 
is a servlet application, and ships with Jetty.  Tomcat is not usually 
involved.  I joined this mailing list because I was responsible for 
Tomcat servers running apps developed in-house, and every once in a 
while, I needed to ask something tomcat-specific.


Thanks,
Shawn

-
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: Out of memory exception

2021-02-18 Thread Shawn Heisey

On 2/18/2021 11:36 AM, Niranjan Rao wrote:
First apologies for non tomcat question. I have seen that there is 
enough expertise here to provide hints and hints are what I am looking 
for to solve the problem and question is generic enough. I have tried 
researching problem to best of my abilities.


I believe you're right to think this isn't a tomcat question.  There are 
a lot of things it could be.  Tomcat is a *possible* source, though I 
think the chance of that is low.  Without a LOT of info that I would 
probably be useless at interpreting or asking for, it's impossible to 
say for sure.


With problems like this, it is normally the application running inside 
Tomcat that has a problem, not Tomcat itself.  You're likely to get a 
lot more useful information if you go to the people responsible for 
those applications.


We have a java program that regularly throws 
"java.lang.OutOfMemoryError: Java heap space" exception. Puzzling point 
is it happens only on one VM. We have a set of two VMs/boxes spawned 
from same AWS image. Machine class/region is exactly same and since they 
are from same image, they should be mostly identical except stuff like 
host name, ip address etc.


Number of tasks performed by VMs are comparable and not a significant 
difference. Yet, one VM never runs of out of memory and other one does. 
Sometimes it's as soon as half an hour after restarting the process 
while on the other box process is running for days and no issues.


"Comparable" isn't "identical".

Are they running the same apps?  Which apps are involved?  Is the one 
that's throwing OOME handling substantially similar requests when 
compared to one that doesn't?  Is the request rate nearly the same, or 
is the problematic one handling a lot more?  Another applicable 
question, also off topic for this mailing list:  Are the apps in both 
cases configured identically?


I took memory dumps from both VMs and they look similar. Program is 
started with -Xmx1g flag and we have taken regular memory dumps. In many 
cases eclipse MAT reports total memory usage was less than 100MB when 
program crashed with out of memory exception.


That's extremely odd, unless the application requested a REALLY big 
chunk of memory such that the 100MB existing plus the new allocation 
would be larger than the max heap size of 1GB.


Do you have enough free memory that you could increase the max heap to 
2GB or beyond and see what happens?


Has anyone seen anything similar to this? Identical bits of code 
behaving differently? What else should I be looking for?


Earlier you said "comparable" and now you're saying "identical".  So I 
have to ask ... which is it?  Remember that differences in 
configurations, types of requests, and request load can lead to very 
different requirements, even if the apps running inside Tomcat are the same.


Most of my experience in the Java world comes from Solr.  Apache Solr is 
a servlet application, and ships with Jetty.  Tomcat is not usually 
involved.  I joined this mailing list because I was responsible for 
Tomcat servers running apps developed in-house, and every once in a 
while, I needed to ask something tomcat-specific.


Thanks,
Shawn

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



Out of memory exception

2021-02-18 Thread Niranjan Rao

Greetings,


First apologies for non tomcat question. I have seen that there is 
enough expertise here to provide hints and hints are what I am looking 
for to solve the problem and question is generic enough. I have tried 
researching problem to best of my abilities.


It all happens on Ubuntu 20.04 and JDK 15

We have a java program that regularly throws 
"java.lang.OutOfMemoryError: Java heap space" exception. Puzzling point 
is it happens only on one VM. We have a set of two VMs/boxes spawned 
from same AWS image. Machine class/region is exactly same and since they 
are from same image, they should be mostly identical except stuff like 
host name, ip address etc.


Number of tasks performed by VMs are comparable and not a significant 
difference. Yet, one VM never runs of out of memory and other one does. 
Sometimes it's as soon as half an hour after restarting the process 
while on the other box process is running for days and no issues.


I took memory dumps from both VMs and they look similar. Program is 
started with -Xmx1g flag and we have taken regular memory dumps. In many 
cases eclipse MAT reports total memory usage was less than 100MB when 
program crashed with out of memory exception.



Has anyone seen anything similar to this? Identical bits of code 
behaving differently? What else should I be looking for?



Regards,


Niranjan


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



Re: [OT] Out of memory exception - top posting

2014-01-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Nick,

On 1/25/14, 11:12 AM, Nick Williams wrote:
 
 On Jan 24, 2014, at 12:05 PM, Christopher Schultz wrote:
 
 -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
 
 Mark,
 
 On 1/24/14, 10:18 AM, Mark H. Wood wrote:
 On Thu, Jan 23, 2014 at 09:24:41PM -0500, Howard W. Smith, Jr. 
 wrote:
 On Thu, Jan 23, 2014 at 2:08 PM, André Warnier
 a...@ice-sa.com wrote:
 Either people don't read the rules, or they do not
 understand the rule, or they just ignore it.
 
 I agree. As a tomcat/tomee user, I joined the list,
 primarily, to listen in on topics (that interest me), so I
 learned, very quickly, that top-posting is not preferred,
 here.
 
 snip /
 
 My biggest problem is that the Apache projects aren't all
 consistent. I'm a contributor to several (including a committer for
 Logging). Some use only top-posting and discourage bottom-posting.
 Others (Tomcat) use only bottom-posting and discourage top-posting.
 It's very frustrating and makes switching between project lists
 error-prone.

I understand. My perspective is that the ASF is not one single
community, but a collection of communities. Each project has its own
community that is free to choose their mailing list policies,
revision-control system (kind of), etc.

Not all ASF projects use the same programming language(s),
documentation strategies, etc. Singling-out mailing lists is kind of
cherry-picking. One could complain about quite a few things. Again, it
goes back to the community and what the general preferences are.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS5n3oAAoJEBzwKT+lPKRYHSEQAMDfKyNHXuFISRmTO0r2i1YI
ljNldMkJGMb0D1EajCqfetzpSGG3X0XLOBmz4xRKzGYm4tbuzY1nvVy2e9vRqL2k
N0rjcajMEvUf4kj+yDHF6ibk1Rqo6TVGcAmfM2gnsdj7Uu0dI/d77ayEeMI9DdhE
xZB5EBbdaCU6Lm6duS88ZzYkNXUsIvxHh1C8MxiTsUGqBZkdd1ERCBHziGPBcuj3
2kVyxuqsZ/pLqasfMSM6fjcHF4ph7wfejidbqHDyn+3Uco4H8y63sljs5rHNPgQn
p773IO+GBhjSjQ8QDv443qMZlItdCSQFyLCMUryrwtMoIjgnVnFxaOfPh9sI1e39
mlS/xZpMc/heCeuIV6fMauft+Zmoq34Z6PkBGZnd0tvmuDZ4B9U3opz8+9UOsjsC
fJKGvaAJ9zlC3ne/PMyNGJ2LK2eDP7hN6+fhHU2LY2po1wwcwltjvfH86KePuA+K
yXjVQmvd2u12fJofn0xnPgDTx/JYCok7r0LTt/d5nBA9OgkuXVlER7uGiAo8Ny1Y
HYsWBb2y68hlCk2LgHsh4py8U3DQZRYpS/bKNKqgRPYDikI4CEQGDyMEsAQZbTjy
PmjhiofvkGdAwvWcxVH1wAhe00fY7UGOi8v7KYs2PYEJq2WR3mXCOLaWWXbPODEn
75Z18Bzq0HlJfd3c+z3S
=TWSF
-END PGP SIGNATURE-

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



Re: [OT] Out of memory exception - top posting

2014-01-25 Thread Nick Williams

On Jan 24, 2014, at 12:05 PM, Christopher Schultz wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Mark,
 
 On 1/24/14, 10:18 AM, Mark H. Wood wrote:
 On Thu, Jan 23, 2014 at 09:24:41PM -0500, Howard W. Smith, Jr.
 wrote:
 On Thu, Jan 23, 2014 at 2:08 PM, André Warnier a...@ice-sa.com
 wrote:
 Either people don't read the rules, or they do not understand
 the rule, or they just ignore it.
 
 I agree. As a tomcat/tomee user, I joined the list, primarily, to
 listen in on topics (that interest me), so I learned, very
 quickly, that top-posting is not preferred, here.
 
 snip /

My biggest problem is that the Apache projects aren't all consistent. I'm a 
contributor to several (including a committer for Logging). Some use only 
top-posting and discourage bottom-posting. Others (Tomcat) use only 
bottom-posting and discourage top-posting. It's very frustrating and makes 
switching between project lists error-prone.

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



Re: [OT] Out of memory exception - top posting

2014-01-24 Thread Johan Compagner
On 23 January 2014 20:08, André Warnier a...@ice-sa.com wrote:

 Ray Holme wrote:

 Doing anything as root conceals the errors. Tomcat is no exception and
 changing it to a real user makes your testing complete.


 Guys,
 I think that the rule (or should I say suggestion ?) on this list to *not*
 top-post is not working.
 Either people don't read the rules, or they do not understand the rule, or
 they just ignore it.


personally i don't like bottom posting, for me that reads way more annoying
But that is because i use gmail, and that one already nests it very nicely
and collapse all the bottom
So you read it already perfectly as if it was a bottom post.

So i really find all this in between and bottom post harder to read for
this list then any other list i used just because of that
i must scan way more through all the replies where the actual replies are

I don't mind for this list, so i do what others like to have, but i am very
happy that this is one of the few doing this...

-- 
Johan Compagner
Servoy


Re: [OT] Out of memory exception - top posting

2014-01-24 Thread chris derham
 There are probably lots of reasons for top-posting, and I don't think we can
 lay the blame on the MS Outlook world. The people I work with use a mixture
 of Thunderbird, web-based interfaces, and Outlook.

 Every one of them top-posts :-(.

When you click reply in these email clients, they insert the caret at
the top of the email with the original email indented below. This is
the out of the box default. It can be changed, but most people won't
know how/care to/prefer it this way.

 I think top-posting says a lot about the thought process of the poster. To
 me it says, my issue, problem, answer, concern is of paramount importance.
 You should remember everything about my issue. After all, I remember
 everything about my issue.

 The attitude is probably not malicious, but more along the lines of a lack
 of perspective.

As long as you can visually distinguish the reply from the original,
does it really matter if that reply is above or below the original?
When people reply to a thread, as long as their email client indents,
you have that clear visual indication. As a programmer, I have seen
arguments about indentation and brace position. This smacks to me as
one of those.

Personally I think that life really is too short to get hung up about
this. People want help. I joined this mailing list to help them, to
kind of pay back for people that had helped me with previous problems.
Lets help them.

 Save your own time and the time of everyone else on the list
(and the archives, where useless messages can't be removed) and just
skip that step.

+1 Personally I find replies to threads that are more conversational,
far more offensive than top posting. This isn't facebook. If the reply
doesn't provide help to the issue at hand, don't send

2C

Chris

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



RE: [OT] Out of memory exception - top posting

2014-01-24 Thread Caldarale, Charles R
 From: cjder...@gmail.com [mailto:cjder...@gmail.com]
 On Behalf Of chris derham
 Subject: Re: [OT] Out of memory exception - top posting

 As long as you can visually distinguish the reply from the original,
 does it really matter if that reply is above or below the original?

Always bottom-posting is pretty much as useless and lazy as always top-posting. 
 Many, possibly most, of the messages on this list contain multiple points 
which need to be answered individually.  Neither top- nor bottom-posting works 
for these; inline responses are required to make sense of the answers.

 When people reply to a thread, as long as their email client indents,
 you have that clear visual indication.

Except for the few people who like to indent their responses, turning 
everything into gibberish.

 - 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: [OT] Out of memory exception - top posting

2014-01-24 Thread Mark H. Wood
If I can't figure out what the post is talking about by looking at the
first 50-60 lines, I usually just hit D and move on.  If, by some
miracle, the poster really needed to reach *me*, he may eventually ask
why I don't respond, and then I can tell him privately why I find his
messages unintelligible.  This also limits the effort I waste on
messages that are all quotation, with no original content.

I suspect that lots of email users expect the UA to do the Right
Thing, while UA designers understand that this is a thing which the UA
cannot do because it requires understanding of the content.  So the
UA punts, leaving the cursor at the top of the message, and the
trusting user thinks this is what should happen.  The *adept* user
knows that editing and composition make his work more effective, and
is guided by training and experience rather than the UA.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Machines should not be friendly.  Machines should be obedient.


signature.asc
Description: Digital signature


Re: [OT] Out of memory exception - top posting

2014-01-24 Thread Ray Holme





On Friday, January 24, 2014 9:46 AM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:
 
 From: cjder...@gmail.com [mailto:cjder...@gmail.com]
 On Behalf Of chris derham
 Subject: Re: [OT] Out of memory exception - top posting

 As long as you can visually distinguish the reply from the original,
 does it really matter if that reply is above or below the original?

Always bottom-posting is pretty much as useless and lazy as always top-posting. 
 Many, possibly most, of the messages on this list contain multiple points 
which need to be answered individually.  Neither top- nor bottom-posting works 
for these; inline responses are required to make sense of the answers.

 MY REPLY: In this case, the reply seemed to make sense there, BUT if it makes 
you happier I will just slap myself again.
I get it.

 When people reply to a thread, as long as their email client indents,
 you have that clear visual indication.

Except for the few people who like to indent their responses, turning 
everything into gibberish.

 MY REPLY:  Agreed. And by the way - it appears that yahoo is not properly 
indenting this or my above reply as it ought to. It seems like kind of overkill 
for me to go and do it for the mailer - but I did it so you can see. So not 
sure what I will do in the future.

- Ray



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

Re: [OT] Out of memory exception - top posting

2014-01-24 Thread Filip Hanik
Since this is part of a thread, neither top nor bottom posting makes sense,
why include the previous post if we all have access to it in our
conversation thread.
the only time it makes sense to include it, would be when you reply in line
to multiple questions with multiple answers.

there, that should put a lid on it ;)


Re: [OT] Out of memory exception - top posting

2014-01-24 Thread Mark H. Wood
On Thu, Jan 23, 2014 at 09:24:41PM -0500, Howard W. Smith, Jr. wrote:
 On Thu, Jan 23, 2014 at 2:08 PM, André Warnier a...@ice-sa.com wrote:
  Either people don't read the rules, or they do not understand the rule, or
  they just ignore it.
 
 I agree. As a tomcat/tomee user, I joined the list, primarily, to listen in
 on topics (that interest me), so I learned, very quickly, that top-posting
 is not preferred, here.

I may have said this before, but: too bad there is no standard
List-Rules: header to provide machine-readable hints, so that a
conforming UA could remember them from the subscription response or
latest-read message and at least give the user some suggestions.
Rules like no attachments could be acted on by the UA; rules like
no top-posting require human judgment but could be advertized by the
UI.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Machines should not be friendly.  Machines should be obedient.


signature.asc
Description: Digital signature


Re: [OT] Out of memory exception - top posting

2014-01-24 Thread Leo Donahue
All good ideas.

I like the general rule of:  be nice or ignore the post.

Why should we let a user's post turn our day lousy?

I'd hate to see this place turn into what other user forums have
become, not naming names.

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



Re: [OT] Out of memory exception - top posting

2014-01-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Filip,

On 1/24/14, 10:02 AM, Filip Hanik wrote:
 Since this is part of a thread, neither top nor bottom posting
 makes sense, why include the previous post if we all have access to
 it in our conversation thread. the only time it makes sense to
 include it, would be when you reply in line to multiple questions
 with multiple answers.

That works great in Gmail, but nowhere else I know. Unless you like
opening all dozen messages of a thread in separate windows so you can
see them all at once. Not for me, thanks.

 there, that should put a lid on it ;)

I'm assuming that was supposed to be a joke. In either case, I laughed.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS4sZIAAoJEBzwKT+lPKRYQbsQALsHgZp1quK5DAvIo7P0+996
VNl4SwIc6TEYGHEmWJIbpdEcvR/aaDA8RGzx4oZ9iHIDfQ4yGvR3HiycllQQjdtU
Y5s3fvK9wYlDKx+pVWBQIYMSTrhSV3YYtPR8Z7OCBFSBonS0lYvN3OEfOa/f1bSh
stT7YoOhiGWNfiG7Urbc5SQwQF1+pLQZNWM3D8GCRqkBUmzRhT5p3SatwGJJHdcS
MCaj/ywPJQtwWO5sn1m1Emu+coxNdZj9p7CenwNIFv2JL96Najq5lyooIMNH758q
JkwrBeNRS/moHxwRUSST0UDRQN9ftTmNo+8uxPf933KOE8Ijhr06fh8GxevK8HVd
iCUJ7bEouBCDv7lZWcfgAlu6Zi/nsJQK3mLwPikN4dQnO3Z5Jtdz1UPrC+LXc+3R
zZIw9TmhGEZobRf/A+fG/n4f5OqXzLplwzAZaoq9w/9yv46EMzagXbnS+xltrtbi
JMPsj/3diaWJoKEGo5rew3BoryFdXd9cDrb9Z6K9wg2i7JTdaxbtEATHFK8pSz8J
jQBwTKDhjd1mt1xxcUGPul88aSP+aLvS1UmteLHEBI/2TUVKhrtFLM9AK152JVsW
Gc21YtAO7wPkgJHDuCmiFxaVX2kKwzBlXyf05weHxlRw9hiCI68RNbSL8LteAvKb
n7jEq7N9BOtDPZ+aRX+9
=uUQe
-END PGP SIGNATURE-

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



Re: [OT] Out of memory exception - top posting

2014-01-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 1/24/14, 10:18 AM, Mark H. Wood wrote:
 On Thu, Jan 23, 2014 at 09:24:41PM -0500, Howard W. Smith, Jr.
 wrote:
 On Thu, Jan 23, 2014 at 2:08 PM, André Warnier a...@ice-sa.com
 wrote:
 Either people don't read the rules, or they do not understand
 the rule, or they just ignore it.
 
 I agree. As a tomcat/tomee user, I joined the list, primarily, to
 listen in on topics (that interest me), so I learned, very
 quickly, that top-posting is not preferred, here.
 
 I may have said this before, but: too bad there is no standard 
 List-Rules: header to provide machine-readable hints, so that a 
 conforming UA could remember them from the subscription response
 or latest-read message and at least give the user some
 suggestions. Rules like no attachments could be acted on by the
 UA; rules like no top-posting require human judgment but could be
 advertized by the UI.

Slow down, maverick: let mail UA's properly handle existing standards,
first. Then invent new ones. So we'll be ready for this kind of thing
in maybe AD 2197.

Just what we need: a bunch of nerds all using Eudora, Thunderbird, and
Pine yelling at the whole world of people still using Apple Mail,
Outlook, etc. whose UAs don't auto-handle those standards. We'd just
be moving the problem from users who won't follow the rules to UAs who
won't follow the rules.

Also, it's hard to enforce context-specific replies (which, to me,
are the most useful) rather than strict top-posting versus bottom-posting.

That being said, it would be really cool if it were practical to have
such list hints.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS4sd0AAoJEBzwKT+lPKRYN9YP/iDsH0ZVa5QVmA4dnXkKVpp+
nF/MEhvc5ZjmQkg+e+zOJdJzgbcDMJqbEP5iLC0VWUQdEdUYhh3J1uibRbDOhcXp
Q9GTn9V/EqEG45g8sPZ8qc7ZynWLytJNX5HIRZ1nLTNOQLbNGy1IuE+9Vyf+r3+8
fGcNiGdZvy1l5+Xi+9j5vJmz1YyEShvzNGGBwW9E4KzLSI6j/njTGYIj3FtGDJYA
QzMvky1X++ig0NNCDQRHYu/MYPdy2jVfWtetBUK++tStfeMvDTSpjSE/R6xg0cdR
jeh1Q1uCOgNNuL9Fb+w8jMGIZA5agLCLy+1ehgCu3BqwycijdY9dHcJedKNJDuO5
OsK6CktE/N2XiDdYif4d8yGQ16xnEFR1OGyIfKfSDEnqFtxIo7pbOluwOhC0XgIz
jfN/yYi52JFw7hIsfQuvXoWZ3QZeEbXJWTUcW8quBaWY+xPMCPPi544YFTRoBjJr
1ylY4rcHH+fa78gYX29bK2t8dUG7/0bsZdOs49Ps6Q2XiZE7wqT6xJT30Wow+2w6
gUBMBaD5Zynl/wigExN5tPZMWV9KrW0RNtXuz6JRI5lUW/P30CrPNIpUTH4szfNC
LuZFeMc1L20U5AwykbzMlkGzR4GB/1TuExvESVKt0Ux9Q/k9nOXBQ15yjvgd4leq
5ChZHDksqLMIXqcADs3L
=OiyX
-END PGP SIGNATURE-

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



Out of memory exception

2014-01-23 Thread Randeep
Hi,

I'm getting out of memory exception errors.

Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
at java.lang.StringBuffer.append(StringBuffer.java:320)
at org.json.JSONArray.toString(JSONArray.java:834)
at org.json.JSONObject.valueToString(JSONObject.java:1359)
at org.json.JSONObject.toString(JSONObject.java:1233)
at com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503)
at com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

Is there anyway to see currently set jvm heap size details? Any linux
commands.

I have tried creating setenv.sh and putting the new parameters in it. but
echo $JAVA_OPTS was not giving any value. So I have put in .bash_profile
and run it. Then restarted tomcat6.

this is the line I added in .bash_profile.
JAVA_OPTS=-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log

Also I checked in heap.log where catelina.out can be found. But its not
created. Then I touched and restarted. But that also didn't work.

What is the right way to do this?

-- 
Randeep
Mob: +919447831699[kerala]
Mob: +919880050349[B'lore]
I blog here:
http://www.randeeppr.me/
Follow me Here:
http://twitter.com/Randeeppr
Poke me here!
http://www.facebook.com/Randeeppr
A little Linux Help
http://www.linuxhelp.in/
Work profile:
http://in.linkedin.com/in/randeeppr


Do some research before blogging (was: Out of memory exception)

2014-01-23 Thread KD
Randeep writes:

 I blog here:
 http://www.randeeppr.me/

Great, but recommending to run Tomcat as root is dangerous nonsense.


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



Re: Out of memory exception

2014-01-23 Thread Daniel Mikusa
On Jan 23, 2014, at 7:43 AM, Randeep randeep...@gmail.com wrote:

 Hi,
 
 I'm getting out of memory exception errors.
 
 Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at
 java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
at java.lang.StringBuffer.append(StringBuffer.java:320)
at org.json.JSONArray.toString(JSONArray.java:834)
at org.json.JSONObject.valueToString(JSONObject.java:1359)
at org.json.JSONObject.toString(JSONObject.java:1233)
at com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503)
at com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
 
 Is there anyway to see currently set jvm heap size details? Any linux
 commands.

If you run “ps” and “grep” for something like “java”, “catalina”, etc.. you can 
find your running Tomcat process.  On Linux this should show the full command 
that was run.

Alternatively, you could use “jinfo pid”.  That will dump a bunch of info 
including the VM Flags.

 
 I have tried creating setenv.sh and putting the new parameters in it. but
 echo $JAVA_OPTS was not giving any value.

How did you install Tomcat?  Did you use your distro’s package manager?  Did 
you download from tomcat.apache.org?

How are you starting your server?  Are you using the included start script?  
Are you using an init.d (or other) script you created?  Are you using commons 
daemon?

 So I have put in .bash_profile and run it.

Don’t do that.  Why would you want these in your bash profile?

 Then restarted tomcat6.

What version exactly?  There are quite a few.

 this is the line I added in .bash_profile.
 JAVA_OPTS=-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log”

Again, don’t put this in your profile.

 Also I checked in heap.log where catelina.out can be found. But its not
 created. Then I touched and restarted. But that also didn't work.
 
 What is the right way to do this?

If you downloaded from tomcat.apache.org and installed from the zip, you’d put 
them in bin/setenv.sh and it would work.  If you’re using a packaged version of 
Tomcat from your Linux distro, then it may well be different.  If you gave more 
details, perhaps someone on the list could help.

Dan

 
 -- 
 Randeep
 Mob: +919447831699[kerala]
 Mob: +919880050349[B'lore]
 I blog here:
 http://www.randeeppr.me/
 Follow me Here:
 http://twitter.com/Randeeppr
 Poke me here!
 http://www.facebook.com/Randeeppr
 A little Linux Help
 http://www.linuxhelp.in/
 Work profile:
 http://in.linkedin.com/in/randeeppr


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



Re: Out of memory exception

2014-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Randeep,

On 1/23/14, 7:43 AM, Randeep wrote:
 I'm getting out of memory exception errors.

:(

 Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
 space at java.util.Arrays.copyOf(Arrays.java:2882) at 
 java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)

 
at
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)

 
at java.lang.StringBuffer.append(StringBuffer.java:320)
 at org.json.JSONArray.toString(JSONArray.java:834) at
 org.json.JSONObject.valueToString(JSONObject.java:1359) at
 org.json.JSONObject.toString(JSONObject.java:1233) at
 com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at
 com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at
 java.util.TimerThread.mainLoop(Timer.java:512) at
 java.util.TimerThread.run(Timer.java:462)

If you are trying to serialize huge JSON objects, this is going to
happen. I'm not sure if JSON is as smart as the Java Serialization
engine, but if you have a circular-reference in your object graph, I'd
be willing to bet that the JSON serializer will run forever and
exhaust your heap.

It's also possible that you simply have a tiny heap and need more,
especially if you aren't currently setting any heap parameters.

 Is there anyway to see currently set jvm heap size details? Any
 linux commands.

You can attach any profiler to your app. Good luck catching this in
the act, though, in production.

You can also use jmap -heap which comes with the JDK. Just point it
at a process and you'll get a heap summary from a running JVM. Make
sure your JVM and jmap version match.

 I have tried creating setenv.sh and putting the new parameters in
 it. but echo $JAVA_OPTS was not giving any value.

setenv.sh is run during Tomcat startup. Running echo $JAVA_OPTS from
the command-line isn't going to reveal anything. What you want to do
is modify setenv.sh, re-launch Tomcat, and then look at the process
command line... something like this:

$ ps aux | grep Bootstrap

This should give you the whole command-line for Tomcat, and you can
verify that your heap options have been set.

 So I have put in .bash_profile and run it. Then restarted tomcat6.

Don't do that: it will only work if you login using bash, and it won't
work for other users you may have to restart Tomcat.

 this is the line I added in .bash_profile. JAVA_OPTS=-Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log

You'll need to export JAVA_OPTS, otherwise it won't do anything for you.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS4TM+AAoJEBzwKT+lPKRYfB4QAMP4/MORiK92nK4kJ+KD9alc
2QYcriasb8QkPPgvYHGhGaxeLIprb1TE6tZdMSp08bHadDr+HpSbxi5xq9C6A1RJ
fabHj9ShrXqdtTFiewPH3P/ulvaaJNPD1LeIFBwoG7/4vAIGKW48gLhaRUYcbe+z
lV2NsZ18u38EZ9KRR8An66jX4PkwMXxl4QdQx5HDmuS/Sx8G7AfDVkuSB5PMNXbg
TVlSEz5VeJnEGtBwnjgIa6ZSTv+iIv+nsw4WVuMe+4h1R07e1axxNismkgpUsU46
Ra4P7TssgdrqXFXmX4+kPNzd3xbbhPYIOOrQ0PYt6wGF0Wd9N1r/gvvViDbgghca
wp39c3VJM8eE2vy9n0XCGYBkdq2DnRNVFV2y2xnfwecWKtDPEWfklTk8ZvbcAyxe
hi3hxQnChCk74nxd/hvI1uNfgHcd/NwtmifwXPNM0BQCZ+AJarCbGca+a/BTTBaX
txVIuIEf3jt/gpFu28UI8kt7Hx/PgWJ32QFyIPCbH5EYaSiKSz/Q6wCTvJTbUG4s
GCK8AB/rGf1Z8efKlUZw2ESr1yX/VBCu9uOEK/60v+AAthiubq+O2ke1TzWKvy/I
MxDhNiMo710w98h5hqIl5SthwXCgv3vEaaiUgDUV8zP3CoOtHL61NNZmLrMBTD2X
18aTMDKJ9BTvoYoZcmyV
=IL2E
-END PGP SIGNATURE-

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



Re: Out of memory exception

2014-01-23 Thread Randeep
Hi all,
Thanks a lot for valuable points. Here the information you guys asked and
the changes I made.

OS : CentOS release 5.4 (Final)
httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37

I installed httpd using yum.
Downloaded tomcat from Apache as compressed archive(tar.gz)

I'm using following startup script.
[root@server ~]# cat /etc/init.d/tomcat6
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/usr/java/default
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/share/apache-tomcat-6.0.37
case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0

As you said, I removed the JAVA_OPTS declaration from .bash_profile and I
have created setenv.sh and set JAVA_OPTS in it.
[root@server bin]# pwd
/usr/share/apache-tomcat-6.0.37/bin

[root@server bin]# cat setenv.sh
export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log'

Now it shows in grep.
[root@server bin]# ps aux | grep Bootstrap
root  1100 33.7  5.4 707052 95240 pts/0Sl   11:29   0:06
/usr/java/default/bin/java
-Djava.util.logging.config.file=/usr/share/apache-tomcat-6.0.37/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms256m
-Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log
-Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath
/usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar
-Dcatalina.base=/usr/share/apache-tomcat-6.0.37
-Dcatalina.home=/usr/share/apache-tomcat-6.0.37
-Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp
org.apache.catalina.startup.Bootstrap start
root  1158  0.0  0.0   3932   692 pts/0R+   11:29   0:00 grep
Bootstrap
[root@server bin]#

But nothing came in heap.log. So I better monitor this and if I get the OOM
again I have to increase Max limit!


On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Randeep,

 On 1/23/14, 7:43 AM, Randeep wrote:
  I'm getting out of memory exception errors.

 :(

  Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
  space at java.util.Arrays.copyOf(Arrays.java:2882) at
 
 java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
 
 
 at
  java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
 
 
 at java.lang.StringBuffer.append(StringBuffer.java:320)
  at org.json.JSONArray.toString(JSONArray.java:834) at
  org.json.JSONObject.valueToString(JSONObject.java:1359) at
  org.json.JSONObject.toString(JSONObject.java:1233) at
  com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at
  com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at
  java.util.TimerThread.mainLoop(Timer.java:512) at
  java.util.TimerThread.run(Timer.java:462)

 If you are trying to serialize huge JSON objects, this is going to
 happen. I'm not sure if JSON is as smart as the Java Serialization
 engine, but if you have a circular-reference in your object graph, I'd
 be willing to bet that the JSON serializer will run forever and
 exhaust your heap.

 It's also possible that you simply have a tiny heap and need more,
 especially if you aren't currently setting any heap parameters.

  Is there anyway to see currently set jvm heap size details? Any
  linux commands.

 You can attach any profiler to your app. Good luck catching this in
 the act, though, in production.

 You can also use jmap -heap which comes with the JDK. Just point it
 at a process and you'll get a heap summary from a running JVM. Make
 sure your JVM and jmap version match.

  I have tried creating setenv.sh and putting the new parameters in
  it. but echo $JAVA_OPTS was not giving any value.

 setenv.sh is run during Tomcat startup. Running echo $JAVA_OPTS from
 the command-line isn't going to reveal anything. What you want to do
 is modify setenv.sh, re-launch Tomcat, and then look at the process
 command line... something like this:

 $ ps aux | grep Bootstrap

 This should give you the whole command-line for Tomcat, and you can
 verify that your heap options have been set.

  So I have put in .bash_profile and run it. Then restarted tomcat6.

 Don't do that: it will only work if you login using bash, and it won't
 work for other users you may have to restart Tomcat.

  this is the line I added in .bash_profile. JAVA_OPTS=-Xms256m
  -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log

 You'll need to export JAVA_OPTS, otherwise it won't do anything for you.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQIcBAEBCAAGBQJS4TM+AAoJEBzwKT+lPKRYfB4QAMP4/MORiK92nK4kJ+KD9alc
 2QYcriasb8QkPPgvYHGhGaxeLIprb1TE6tZdMSp08bHadDr+HpSbxi5xq9C6A1RJ
 fabHj9ShrXqdtTFiewPH3P

Re: Do some research before blogging (was: Out of memory exception)

2014-01-23 Thread Randeep
Hi,

I assume you are talking about my blog posts in http://www.linuxhelp.in/

I'm sorry. I'll correct it. I test everything as root user. So while
writing also it came like that.


On Thu, Jan 23, 2014 at 6:40 PM, KD kdal...@hotmail.com wrote:

 Randeep writes:

  I blog here:
  http://www.randeeppr.me/

 Great, but recommending to run Tomcat as root is dangerous nonsense.


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




-- 
Randeep
Mob: +919447831699[kerala]
Mob: +919880050349[B'lore]
I blog here:
http://www.randeeppr.me/
Follow me Here:
http://twitter.com/Randeeppr
Poke me here!
http://www.facebook.com/Randeeppr
A little Linux Help
http://www.linuxhelp.in/
Work profile:
http://in.linkedin.com/in/randeeppr


Re: Out of memory exception

2014-01-23 Thread André Warnier

Randeep wrote:

Hi all,
Thanks a lot for valuable points. Here the information you guys asked and
the changes I made.

OS : CentOS release 5.4 (Final)
httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37

I installed httpd using yum.
Downloaded tomcat from Apache as compressed archive(tar.gz)

I'm using following startup script.
[root@server ~]# cat /etc/init.d/tomcat6
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/usr/java/default
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/share/apache-tomcat-6.0.37
case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0

As you said, I removed the JAVA_OPTS declaration from .bash_profile and I
have created setenv.sh and set JAVA_OPTS in it.
[root@server bin]# pwd
/usr/share/apache-tomcat-6.0.37/bin

[root@server bin]# cat setenv.sh
export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log'

Now it shows in grep.
[root@server bin]# ps aux | grep Bootstrap
root  1100 33.7  5.4 707052 95240 pts/0Sl   11:29   0:06
/usr/java/default/bin/java
-Djava.util.logging.config.file=/usr/share/apache-tomcat-6.0.37/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms256m
-Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log
-Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath
/usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar
-Dcatalina.base=/usr/share/apache-tomcat-6.0.37
-Dcatalina.home=/usr/share/apache-tomcat-6.0.37
-Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp
org.apache.catalina.startup.Bootstrap start
root  1158  0.0  0.0   3932   692 pts/0R+   11:29   0:00 grep
Bootstrap
[root@server bin]#

But nothing came in heap.log. So I better monitor this and if I get the OOM
again I have to increase Max limit!


Maybe you should provide a full path for the -Xloggc option ?




On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Randeep,

On 1/23/14, 7:43 AM, Randeep wrote:

I'm getting out of memory exception errors.

:(


Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
space at java.util.Arrays.copyOf(Arrays.java:2882) at


java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)



at

java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)



at java.lang.StringBuffer.append(StringBuffer.java:320)

at org.json.JSONArray.toString(JSONArray.java:834) at
org.json.JSONObject.valueToString(JSONObject.java:1359) at
org.json.JSONObject.toString(JSONObject.java:1233) at
com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at
com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at
java.util.TimerThread.mainLoop(Timer.java:512) at
java.util.TimerThread.run(Timer.java:462)

If you are trying to serialize huge JSON objects, this is going to
happen. I'm not sure if JSON is as smart as the Java Serialization
engine, but if you have a circular-reference in your object graph, I'd
be willing to bet that the JSON serializer will run forever and
exhaust your heap.

It's also possible that you simply have a tiny heap and need more,
especially if you aren't currently setting any heap parameters.


Is there anyway to see currently set jvm heap size details? Any
linux commands.

You can attach any profiler to your app. Good luck catching this in
the act, though, in production.

You can also use jmap -heap which comes with the JDK. Just point it
at a process and you'll get a heap summary from a running JVM. Make
sure your JVM and jmap version match.


I have tried creating setenv.sh and putting the new parameters in
it. but echo $JAVA_OPTS was not giving any value.

setenv.sh is run during Tomcat startup. Running echo $JAVA_OPTS from
the command-line isn't going to reveal anything. What you want to do
is modify setenv.sh, re-launch Tomcat, and then look at the process
command line... something like this:

$ ps aux | grep Bootstrap

This should give you the whole command-line for Tomcat, and you can
verify that your heap options have been set.


So I have put in .bash_profile and run it. Then restarted tomcat6.

Don't do that: it will only work if you login using bash, and it won't
work for other users you may have to restart Tomcat.


this is the line I added in .bash_profile. JAVA_OPTS=-Xms256m
-Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log

You'll need to export JAVA_OPTS, otherwise it won't do anything for you.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS4TM+AAoJEBzwKT+lPKRYfB4QAMP4/MORiK92nK4kJ+KD9alc
2QYcriasb8QkPPgvYHGhGaxeLIprb1TE6tZdMSp08bHadDr+HpSbxi5xq9C6A1RJ
fabHj9ShrXqdtTFiewPH3P

Re: Out of memory exception

2014-01-23 Thread Daniel Mikusa
On Jan 23, 2014, at 11:38 AM, Randeep randeep...@gmail.com wrote:

 Hi all,
 Thanks a lot for valuable points. Here the information you guys asked and
 the changes I made.
 
 OS : CentOS release 5.4 (Final)
 httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37
 
 I installed httpd using yum.
 Downloaded tomcat from Apache as compressed archive(tar.gz)
 
 I'm using following startup script.
 [root@server ~]# cat /etc/init.d/tomcat6
 #!/bin/bash
 # description: Tomcat Start Stop Restart
 # processname: tomcat
 # chkconfig: 234 20 80
 JAVA_HOME=/usr/java/default
 export JAVA_HOME
 PATH=$JAVA_HOME/bin:$PATH
 export PATH
 CATALINA_HOME=/usr/share/apache-tomcat-6.0.37
 case $1 in
 start)
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 stop)
 sh $CATALINA_HOME/bin/shutdown.sh
 ;;
 restart)
 sh $CATALINA_HOME/bin/shutdown.sh
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 esac
 exit 0
 
 As you said, I removed the JAVA_OPTS declaration from .bash_profile and I
 have created setenv.sh and set JAVA_OPTS in it.
 [root@server bin]# pwd
 /usr/share/apache-tomcat-6.0.37/bin
 
 [root@server bin]# cat setenv.sh
 export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k

 -verbose:gc -Xloggc:heap.log’

Based on the name of the file you’re listing, it makes me think you’re 
confusing what this option does.  It’s a garbage collection log.  While that 
shows some info about the heap, it’s mainly targeted towards knowing what’s 
happening with GC in your process. 

I can’t help but think you might be looking for 
-XX:+HeapDumpOnOutOfMemoryError, which generates a heap dump when you get an 
OOME.

 
 Now it shows in grep.
 [root@server bin]# ps aux | grep Bootstrap
 root  1100 33.7  5.4 707052 95240 pts/0Sl   11:29   0:06
 /usr/java/default/bin/java
 -Djava.util.logging.config.file=/usr/share/apache-tomcat-6.0.37/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log
 -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath
 /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar
 -Dcatalina.base=/usr/share/apache-tomcat-6.0.37
 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37
 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp
 org.apache.catalina.startup.Bootstrap start
 root  1158  0.0  0.0   3932   692 pts/0R+   11:29   0:00 grep
 Bootstrap
 [root@server bin]#
 
 But nothing came in heap.log.

Try using this option instead:  -Xloggc:$CATALINA_BASE/logs/heap.log”

That should put the file in your “logs” directory.

Dan

 So I better monitor this and if I get the OOM
 again I have to increase Max limit!
 
 
 On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Randeep,
 
 On 1/23/14, 7:43 AM, Randeep wrote:
 I'm getting out of memory exception errors.
 
 :(
 
 Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
 space at java.util.Arrays.copyOf(Arrays.java:2882) at
 
 java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
 
 
 at
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
 
 
 at java.lang.StringBuffer.append(StringBuffer.java:320)
 at org.json.JSONArray.toString(JSONArray.java:834) at
 org.json.JSONObject.valueToString(JSONObject.java:1359) at
 org.json.JSONObject.toString(JSONObject.java:1233) at
 com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at
 com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at
 java.util.TimerThread.mainLoop(Timer.java:512) at
 java.util.TimerThread.run(Timer.java:462)
 
 If you are trying to serialize huge JSON objects, this is going to
 happen. I'm not sure if JSON is as smart as the Java Serialization
 engine, but if you have a circular-reference in your object graph, I'd
 be willing to bet that the JSON serializer will run forever and
 exhaust your heap.
 
 It's also possible that you simply have a tiny heap and need more,
 especially if you aren't currently setting any heap parameters.
 
 Is there anyway to see currently set jvm heap size details? Any
 linux commands.
 
 You can attach any profiler to your app. Good luck catching this in
 the act, though, in production.
 
 You can also use jmap -heap which comes with the JDK. Just point it
 at a process and you'll get a heap summary from a running JVM. Make
 sure your JVM and jmap version match.
 
 I have tried creating setenv.sh and putting the new parameters in
 it. but echo $JAVA_OPTS was not giving any value.
 
 setenv.sh is run during Tomcat startup. Running echo $JAVA_OPTS from
 the command-line isn't going to reveal anything. What you want to do
 is modify setenv.sh, re-launch Tomcat, and then look at the process
 command line... something like this:
 
 $ ps aux | grep Bootstrap
 
 This should give you the whole command-line for Tomcat, and you can
 verify that your heap options have been set.
 
 So I have put in .bash_profile and run it. Then restarted

Re: Out of memory exception

2014-01-23 Thread Randeep
Thanks. That worked. Anything unusual? Garbage collection is happening too
often?

[root@server logs]# cat /usr/share/apache-tomcat-6.0.37/logs/heap.log
1.910: [GC 16192K-1923K(260160K), 0.0150080 secs]
2.454: [GC 18115K-3151K(260160K), 0.0137140 secs]
2.760: [GC 19343K-3309K(260160K), 0.0058220 secs]
3.648: [GC 19501K-4446K(260160K), 0.0062870 secs]
4.000: [GC 20638K-5063K(260160K), 0.0080940 secs]
4.305: [GC 21255K-6302K(260160K), 0.0060890 secs]
4.598: [GC 22494K-6323K(260160K), 0.0062020 secs]
5.664: [GC 22515K-7098K(260160K), 0.0055070 secs]
6.980: [GC 23290K-8708K(260160K), 0.0176410 secs]
7.332: [GC 24900K-12045K(260160K), 0.0179400 secs]
7.794: [Full GC 24591K-12864K(260160K), 0.2538960 secs]
8.476: [GC 29184K-14200K(260288K), 0.0080560 secs]
8.939: [GC 30520K-15401K(260288K), 0.0407000 secs]
9.379: [GC 31721K-16897K(260288K), 0.0099850 secs]
9.603: [GC 33217K-16652K(260288K), 0.0649140 secs]
10.498: [GC 32972K-17768K(260288K), 0.0068540 secs]
10.885: [GC 34088K-18538K(260288K), 0.0084330 secs]
11.225: [GC 34858K-19584K(260288K), 0.0071730 secs]
11.466: [GC 35904K-20313K(260288K), 0.0050570 secs]
12.128: [GC 36633K-20565K(260288K), 0.0042210 secs]
12.385: [Full GC 26015K-20204K(260288K), 0.2847340 secs]
13.817: [GC 36524K-22174K(260288K), 0.0155690 secs]
14.127: [GC 38494K-25303K(260288K), 0.0816490 secs]
14.671: [GC 41623K-27150K(260288K), 0.0436660 secs]
15.173: [GC 43470K-28757K(260288K), 0.0140720 secs]
15.414: [Full GC 32030K-28926K(260288K), 0.3071990 secs]
65.004: [GC 45310K-31775K(260352K), 0.0105440 secs]
[root@server logs]#


On Thu, Jan 23, 2014 at 10:33 PM, André Warnier a...@ice-sa.com wrote:

 Randeep wrote:

 Hi all,
 Thanks a lot for valuable points. Here the information you guys asked and
 the changes I made.

 OS : CentOS release 5.4 (Final)
 httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37

 I installed httpd using yum.
 Downloaded tomcat from Apache as compressed archive(tar.gz)

 I'm using following startup script.
 [root@server ~]# cat /etc/init.d/tomcat6
 #!/bin/bash
 # description: Tomcat Start Stop Restart
 # processname: tomcat
 # chkconfig: 234 20 80
 JAVA_HOME=/usr/java/default
 export JAVA_HOME
 PATH=$JAVA_HOME/bin:$PATH
 export PATH
 CATALINA_HOME=/usr/share/apache-tomcat-6.0.37
 case $1 in
 start)
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 stop)
 sh $CATALINA_HOME/bin/shutdown.sh
 ;;
 restart)
 sh $CATALINA_HOME/bin/shutdown.sh
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 esac
 exit 0

 As you said, I removed the JAVA_OPTS declaration from .bash_profile and I
 have created setenv.sh and set JAVA_OPTS in it.
 [root@server bin]# pwd
 /usr/share/apache-tomcat-6.0.37/bin

 [root@server bin]# cat setenv.sh
 export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log'

 Now it shows in grep.
 [root@server bin]# ps aux | grep Bootstrap
 root  1100 33.7  5.4 707052 95240 pts/0Sl   11:29   0:06
 /usr/java/default/bin/java
 -Djava.util.logging.config.file=/usr/share/apache-tomcat-
 6.0.37/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log
 -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath
 /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar
 -Dcatalina.base=/usr/share/apache-tomcat-6.0.37
 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37
 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp
 org.apache.catalina.startup.Bootstrap start
 root  1158  0.0  0.0   3932   692 pts/0R+   11:29   0:00 grep
 Bootstrap
 [root@server bin]#

 But nothing came in heap.log. So I better monitor this and if I get the
 OOM
 again I have to increase Max limit!


 Maybe you should provide a full path for the -Xloggc option ?




 On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

  -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Randeep,

 On 1/23/14, 7:43 AM, Randeep wrote:

 I'm getting out of memory exception errors.

 :(

  Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
 space at java.util.Arrays.copyOf(Arrays.java:2882) at

  java.lang.AbstractStringBuilder.expandCapacity(
 AbstractStringBuilder.java:100)


  at

 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)


  at java.lang.StringBuffer.append(StringBuffer.java:320)

 at org.json.JSONArray.toString(JSONArray.java:834) at
 org.json.JSONObject.valueToString(JSONObject.java:1359) at
 org.json.JSONObject.toString(JSONObject.java:1233) at
 com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at
 com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at
 java.util.TimerThread.mainLoop(Timer.java:512) at
 java.util.TimerThread.run(Timer.java:462)

 If you are trying to serialize huge JSON objects, this is going to
 happen. I'm not sure if JSON is as smart as the Java Serialization
 engine, but if you have a circular-reference in your object graph, I'd
 be willing to bet that the JSON serializer

Re: Out of memory exception

2014-01-23 Thread Randeep
I mean i'd to give full path.

like this
export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc
-Xloggc:/usr/share/apache-tomcat-6.0.37/logs/heap.log'



On Thu, Jan 23, 2014 at 10:47 PM, Randeep randeep...@gmail.com wrote:

 Thanks. That worked. Anything unusual? Garbage collection is happening too
 often?

 [root@server logs]# cat /usr/share/apache-tomcat-6.0.37/logs/heap.log
 1.910: [GC 16192K-1923K(260160K), 0.0150080 secs]
 2.454: [GC 18115K-3151K(260160K), 0.0137140 secs]
 2.760: [GC 19343K-3309K(260160K), 0.0058220 secs]
 3.648: [GC 19501K-4446K(260160K), 0.0062870 secs]
 4.000: [GC 20638K-5063K(260160K), 0.0080940 secs]
 4.305: [GC 21255K-6302K(260160K), 0.0060890 secs]
 4.598: [GC 22494K-6323K(260160K), 0.0062020 secs]
 5.664: [GC 22515K-7098K(260160K), 0.0055070 secs]
 6.980: [GC 23290K-8708K(260160K), 0.0176410 secs]
 7.332: [GC 24900K-12045K(260160K), 0.0179400 secs]
 7.794: [Full GC 24591K-12864K(260160K), 0.2538960 secs]
 8.476: [GC 29184K-14200K(260288K), 0.0080560 secs]
 8.939: [GC 30520K-15401K(260288K), 0.0407000 secs]
 9.379: [GC 31721K-16897K(260288K), 0.0099850 secs]
 9.603: [GC 33217K-16652K(260288K), 0.0649140 secs]
 10.498: [GC 32972K-17768K(260288K), 0.0068540 secs]
 10.885: [GC 34088K-18538K(260288K), 0.0084330 secs]
 11.225: [GC 34858K-19584K(260288K), 0.0071730 secs]
 11.466: [GC 35904K-20313K(260288K), 0.0050570 secs]
 12.128: [GC 36633K-20565K(260288K), 0.0042210 secs]
 12.385: [Full GC 26015K-20204K(260288K), 0.2847340 secs]
 13.817: [GC 36524K-22174K(260288K), 0.0155690 secs]
 14.127: [GC 38494K-25303K(260288K), 0.0816490 secs]
 14.671: [GC 41623K-27150K(260288K), 0.0436660 secs]
 15.173: [GC 43470K-28757K(260288K), 0.0140720 secs]
 15.414: [Full GC 32030K-28926K(260288K), 0.3071990 secs]
 65.004: [GC 45310K-31775K(260352K), 0.0105440 secs]
 [root@server logs]#


 On Thu, Jan 23, 2014 at 10:33 PM, André Warnier a...@ice-sa.com wrote:

 Randeep wrote:

 Hi all,
 Thanks a lot for valuable points. Here the information you guys asked and
 the changes I made.

 OS : CentOS release 5.4 (Final)
 httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37

 I installed httpd using yum.
 Downloaded tomcat from Apache as compressed archive(tar.gz)

 I'm using following startup script.
 [root@server ~]# cat /etc/init.d/tomcat6
 #!/bin/bash
 # description: Tomcat Start Stop Restart
 # processname: tomcat
 # chkconfig: 234 20 80
 JAVA_HOME=/usr/java/default
 export JAVA_HOME
 PATH=$JAVA_HOME/bin:$PATH
 export PATH
 CATALINA_HOME=/usr/share/apache-tomcat-6.0.37
 case $1 in
 start)
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 stop)
 sh $CATALINA_HOME/bin/shutdown.sh
 ;;
 restart)
 sh $CATALINA_HOME/bin/shutdown.sh
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 esac
 exit 0

 As you said, I removed the JAVA_OPTS declaration from .bash_profile and I
 have created setenv.sh and set JAVA_OPTS in it.
 [root@server bin]# pwd
 /usr/share/apache-tomcat-6.0.37/bin

 [root@server bin]# cat setenv.sh
 export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc
 -Xloggc:heap.log'

 Now it shows in grep.
 [root@server bin]# ps aux | grep Bootstrap
 root  1100 33.7  5.4 707052 95240 pts/0Sl   11:29   0:06
 /usr/java/default/bin/java
 -Djava.util.logging.config.file=/usr/share/apache-tomcat-
 6.0.37/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log
 -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath
 /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar
 -Dcatalina.base=/usr/share/apache-tomcat-6.0.37
 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37
 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp
 org.apache.catalina.startup.Bootstrap start
 root  1158  0.0  0.0   3932   692 pts/0R+   11:29   0:00 grep
 Bootstrap
 [root@server bin]#

 But nothing came in heap.log. So I better monitor this and if I get the
 OOM
 again I have to increase Max limit!


 Maybe you should provide a full path for the -Xloggc option ?




 On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

  -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Randeep,

 On 1/23/14, 7:43 AM, Randeep wrote:

 I'm getting out of memory exception errors.

 :(

  Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
 space at java.util.Arrays.copyOf(Arrays.java:2882) at

  java.lang.AbstractStringBuilder.expandCapacity(
 AbstractStringBuilder.java:100)


  at

 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)


  at java.lang.StringBuffer.append(StringBuffer.java:320)

 at org.json.JSONArray.toString(JSONArray.java:834) at
 org.json.JSONObject.valueToString(JSONObject.java:1359) at
 org.json.JSONObject.toString(JSONObject.java:1233) at
 com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at
 com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at
 java.util.TimerThread.mainLoop(Timer.java:512) at
 java.util.TimerThread.run

Re: Out of memory exception

2014-01-23 Thread Randeep
I have added -XX:+HeapDumpOnOutOfMemoryError also.
Thanks.


On Thu, Jan 23, 2014 at 10:49 PM, Randeep randeep...@gmail.com wrote:

 I mean i'd to give full path.

 like this
 export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc
 -Xloggc:/usr/share/apache-tomcat-6.0.37/logs/heap.log'



 On Thu, Jan 23, 2014 at 10:47 PM, Randeep randeep...@gmail.com wrote:

 Thanks. That worked. Anything unusual? Garbage collection is happening
 too often?

 [root@server logs]# cat /usr/share/apache-tomcat-6.0.37/logs/heap.log
 1.910: [GC 16192K-1923K(260160K), 0.0150080 secs]
 2.454: [GC 18115K-3151K(260160K), 0.0137140 secs]
 2.760: [GC 19343K-3309K(260160K), 0.0058220 secs]
 3.648: [GC 19501K-4446K(260160K), 0.0062870 secs]
 4.000: [GC 20638K-5063K(260160K), 0.0080940 secs]
 4.305: [GC 21255K-6302K(260160K), 0.0060890 secs]
 4.598: [GC 22494K-6323K(260160K), 0.0062020 secs]
 5.664: [GC 22515K-7098K(260160K), 0.0055070 secs]
 6.980: [GC 23290K-8708K(260160K), 0.0176410 secs]
 7.332: [GC 24900K-12045K(260160K), 0.0179400 secs]
 7.794: [Full GC 24591K-12864K(260160K), 0.2538960 secs]
 8.476: [GC 29184K-14200K(260288K), 0.0080560 secs]
 8.939: [GC 30520K-15401K(260288K), 0.0407000 secs]
 9.379: [GC 31721K-16897K(260288K), 0.0099850 secs]
 9.603: [GC 33217K-16652K(260288K), 0.0649140 secs]
 10.498: [GC 32972K-17768K(260288K), 0.0068540 secs]
 10.885: [GC 34088K-18538K(260288K), 0.0084330 secs]
 11.225: [GC 34858K-19584K(260288K), 0.0071730 secs]
 11.466: [GC 35904K-20313K(260288K), 0.0050570 secs]
 12.128: [GC 36633K-20565K(260288K), 0.0042210 secs]
 12.385: [Full GC 26015K-20204K(260288K), 0.2847340 secs]
 13.817: [GC 36524K-22174K(260288K), 0.0155690 secs]
 14.127: [GC 38494K-25303K(260288K), 0.0816490 secs]
 14.671: [GC 41623K-27150K(260288K), 0.0436660 secs]
 15.173: [GC 43470K-28757K(260288K), 0.0140720 secs]
 15.414: [Full GC 32030K-28926K(260288K), 0.3071990 secs]
 65.004: [GC 45310K-31775K(260352K), 0.0105440 secs]
 [root@server logs]#


 On Thu, Jan 23, 2014 at 10:33 PM, André Warnier a...@ice-sa.com wrote:

 Randeep wrote:

 Hi all,
 Thanks a lot for valuable points. Here the information you guys asked
 and
 the changes I made.

 OS : CentOS release 5.4 (Final)
 httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37

 I installed httpd using yum.
 Downloaded tomcat from Apache as compressed archive(tar.gz)

 I'm using following startup script.
 [root@server ~]# cat /etc/init.d/tomcat6
 #!/bin/bash
 # description: Tomcat Start Stop Restart
 # processname: tomcat
 # chkconfig: 234 20 80
 JAVA_HOME=/usr/java/default
 export JAVA_HOME
 PATH=$JAVA_HOME/bin:$PATH
 export PATH
 CATALINA_HOME=/usr/share/apache-tomcat-6.0.37
 case $1 in
 start)
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 stop)
 sh $CATALINA_HOME/bin/shutdown.sh
 ;;
 restart)
 sh $CATALINA_HOME/bin/shutdown.sh
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 esac
 exit 0

 As you said, I removed the JAVA_OPTS declaration from .bash_profile and
 I
 have created setenv.sh and set JAVA_OPTS in it.
 [root@server bin]# pwd
 /usr/share/apache-tomcat-6.0.37/bin

 [root@server bin]# cat setenv.sh
 export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc
 -Xloggc:heap.log'

 Now it shows in grep.
 [root@server bin]# ps aux | grep Bootstrap
 root  1100 33.7  5.4 707052 95240 pts/0Sl   11:29   0:06
 /usr/java/default/bin/java
 -Djava.util.logging.config.file=/usr/share/apache-tomcat-
 6.0.37/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log
 -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed
 -classpath
 /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar
 -Dcatalina.base=/usr/share/apache-tomcat-6.0.37
 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37
 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp
 org.apache.catalina.startup.Bootstrap start
 root  1158  0.0  0.0   3932   692 pts/0R+   11:29   0:00 grep
 Bootstrap
 [root@server bin]#

 But nothing came in heap.log. So I better monitor this and if I get the
 OOM
 again I have to increase Max limit!


 Maybe you should provide a full path for the -Xloggc option ?




 On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

  -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Randeep,

 On 1/23/14, 7:43 AM, Randeep wrote:

 I'm getting out of memory exception errors.

 :(

  Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
 space at java.util.Arrays.copyOf(Arrays.java:2882) at

  java.lang.AbstractStringBuilder.expandCapacity(
 AbstractStringBuilder.java:100)


  at

 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:
 572)


  at java.lang.StringBuffer.append(StringBuffer.java:320)

 at org.json.JSONArray.toString(JSONArray.java:834) at
 org.json.JSONObject.valueToString(JSONObject.java:1359) at
 org.json.JSONObject.toString(JSONObject.java:1233) at
 com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503

Re: Out of memory exception

2014-01-23 Thread Daniel Mikusa
On Jan 23, 2014, at 12:22 PM, Randeep randeep...@gmail.com wrote:

 I have added -XX:+HeapDumpOnOutOfMemoryError also.
 Thanks.

Please stop top posting.

Post your comments inline or at the bottom, like everyone else.  It makes 
following the conversation much easier.

Dan

 
 
 On Thu, Jan 23, 2014 at 10:49 PM, Randeep randeep...@gmail.com wrote:
 
 I mean i'd to give full path.
 
 like this
 export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc
 -Xloggc:/usr/share/apache-tomcat-6.0.37/logs/heap.log'
 
 
 
 On Thu, Jan 23, 2014 at 10:47 PM, Randeep randeep...@gmail.com wrote:
 
 Thanks. That worked. Anything unusual? Garbage collection is happening
 too often?
 
 [root@server logs]# cat /usr/share/apache-tomcat-6.0.37/logs/heap.log
 1.910: [GC 16192K-1923K(260160K), 0.0150080 secs]
 2.454: [GC 18115K-3151K(260160K), 0.0137140 secs]
 2.760: [GC 19343K-3309K(260160K), 0.0058220 secs]
 3.648: [GC 19501K-4446K(260160K), 0.0062870 secs]
 4.000: [GC 20638K-5063K(260160K), 0.0080940 secs]
 4.305: [GC 21255K-6302K(260160K), 0.0060890 secs]
 4.598: [GC 22494K-6323K(260160K), 0.0062020 secs]
 5.664: [GC 22515K-7098K(260160K), 0.0055070 secs]
 6.980: [GC 23290K-8708K(260160K), 0.0176410 secs]
 7.332: [GC 24900K-12045K(260160K), 0.0179400 secs]
 7.794: [Full GC 24591K-12864K(260160K), 0.2538960 secs]
 8.476: [GC 29184K-14200K(260288K), 0.0080560 secs]
 8.939: [GC 30520K-15401K(260288K), 0.0407000 secs]
 9.379: [GC 31721K-16897K(260288K), 0.0099850 secs]
 9.603: [GC 33217K-16652K(260288K), 0.0649140 secs]
 10.498: [GC 32972K-17768K(260288K), 0.0068540 secs]
 10.885: [GC 34088K-18538K(260288K), 0.0084330 secs]
 11.225: [GC 34858K-19584K(260288K), 0.0071730 secs]
 11.466: [GC 35904K-20313K(260288K), 0.0050570 secs]
 12.128: [GC 36633K-20565K(260288K), 0.0042210 secs]
 12.385: [Full GC 26015K-20204K(260288K), 0.2847340 secs]
 13.817: [GC 36524K-22174K(260288K), 0.0155690 secs]
 14.127: [GC 38494K-25303K(260288K), 0.0816490 secs]
 14.671: [GC 41623K-27150K(260288K), 0.0436660 secs]
 15.173: [GC 43470K-28757K(260288K), 0.0140720 secs]
 15.414: [Full GC 32030K-28926K(260288K), 0.3071990 secs]
 65.004: [GC 45310K-31775K(260352K), 0.0105440 secs]
 [root@server logs]#
 
 
 On Thu, Jan 23, 2014 at 10:33 PM, André Warnier a...@ice-sa.com wrote:
 
 Randeep wrote:
 
 Hi all,
 Thanks a lot for valuable points. Here the information you guys asked
 and
 the changes I made.
 
 OS : CentOS release 5.4 (Final)
 httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37
 
 I installed httpd using yum.
 Downloaded tomcat from Apache as compressed archive(tar.gz)
 
 I'm using following startup script.
 [root@server ~]# cat /etc/init.d/tomcat6
 #!/bin/bash
 # description: Tomcat Start Stop Restart
 # processname: tomcat
 # chkconfig: 234 20 80
 JAVA_HOME=/usr/java/default
 export JAVA_HOME
 PATH=$JAVA_HOME/bin:$PATH
 export PATH
 CATALINA_HOME=/usr/share/apache-tomcat-6.0.37
 case $1 in
 start)
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 stop)
 sh $CATALINA_HOME/bin/shutdown.sh
 ;;
 restart)
 sh $CATALINA_HOME/bin/shutdown.sh
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 esac
 exit 0
 
 As you said, I removed the JAVA_OPTS declaration from .bash_profile and
 I
 have created setenv.sh and set JAVA_OPTS in it.
 [root@server bin]# pwd
 /usr/share/apache-tomcat-6.0.37/bin
 
 [root@server bin]# cat setenv.sh
 export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc
 -Xloggc:heap.log'
 
 Now it shows in grep.
 [root@server bin]# ps aux | grep Bootstrap
 root  1100 33.7  5.4 707052 95240 pts/0Sl   11:29   0:06
 /usr/java/default/bin/java
 -Djava.util.logging.config.file=/usr/share/apache-tomcat-
 6.0.37/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log
 -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed
 -classpath
 /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar
 -Dcatalina.base=/usr/share/apache-tomcat-6.0.37
 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37
 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp
 org.apache.catalina.startup.Bootstrap start
 root  1158  0.0  0.0   3932   692 pts/0R+   11:29   0:00 grep
 Bootstrap
 [root@server bin]#
 
 But nothing came in heap.log. So I better monitor this and if I get the
 OOM
 again I have to increase Max limit!
 
 
 Maybe you should provide a full path for the -Xloggc option ?
 
 
 
 
 On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Randeep,
 
 On 1/23/14, 7:43 AM, Randeep wrote:
 
 I'm getting out of memory exception errors.
 
 :(
 
 Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
 space at java.util.Arrays.copyOf(Arrays.java:2882) at
 
 java.lang.AbstractStringBuilder.expandCapacity(
 AbstractStringBuilder.java:100)
 
 
 at
 
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:
 572)
 
 
 at java.lang.StringBuffer.append

Re: Out of memory exception

2014-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Randeep,

On 1/23/14, 11:38 AM, Randeep wrote:
 Hi all, Thanks a lot for valuable points. Here the information you
 guys asked and the changes I made.
 
 OS : CentOS release 5.4 (Final) 
 httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+
 apache-tomcat-6.0.37
 
 I installed httpd using yum. Downloaded tomcat from Apache as
 compressed archive(tar.gz)
 
 I'm using following startup script. [root@server ~]# cat
 /etc/init.d/tomcat6 #!/bin/bash # description: Tomcat Start Stop
 Restart # processname: tomcat # chkconfig: 234 20 80 
 JAVA_HOME=/usr/java/default export JAVA_HOME 
 PATH=$JAVA_HOME/bin:$PATH export PATH 
 CATALINA_HOME=/usr/share/apache-tomcat-6.0.37 case $1 in start) sh
 $CATALINA_HOME/bin/startup.sh ;; stop) sh
 $CATALINA_HOME/bin/shutdown.sh ;; restart) sh
 $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh ;; 
 esac exit 0
 
 As you said, I removed the JAVA_OPTS declaration from .bash_profile
 and I have created setenv.sh and set JAVA_OPTS in it. [root@server
 bin]# pwd /usr/share/apache-tomcat-6.0.37/bin
 
 [root@server bin]# cat setenv.sh export JAVA_OPTS='-Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log'
 
 Now it shows in grep. [root@server bin]# ps aux | grep Bootstrap 
 root  1100 33.7  5.4 707052 95240 pts/0Sl   11:29   0:06 
 /usr/java/default/bin/java 
 -Djava.util.logging.config.file=/usr/share/apache-tomcat-6.0.37/conf/logging.properties

 
- -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log 
 -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed
 -classpath /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar 
 -Dcatalina.base=/usr/share/apache-tomcat-6.0.37 
 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37 
 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp 
 org.apache.catalina.startup.Bootstrap start root  1158  0.0
 0.0   3932   692 pts/0R+   11:29   0:00 grep Bootstrap 
 [root@server bin]#
 
 But nothing came in heap.log.

You should use a full path in Xloggc:heap so you always know where the
file is. As it stands, it will be in the CWD of the JVM process. Not
sure where that is, because you can run startup.sh from anywhere.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS4VJYAAoJEBzwKT+lPKRYhgwP/RZq8grS3/bFNdQL69AV05EF
lRTQWinc6rC9Au3Nqw2u0coydpyspNYJemLJaRgTAN0NPlKMU1mZBcqOrFftnt7R
nUffJeql5Zx2Ef5uT9NhPlLnJpwuSR3oMHk/hs6qiokZaLs5uqzCk/e1/JcH2qi6
Yjnuhfx5wFUO4S6ld0datFmChLFs6XySfhi+2CilFo2Kw4pkdM2Otnf8hD72FW6k
zUGomd9AQw/Jj9/+EojyNYVO/dbcBF5Qa2mnt1PO1tE39x7G7TziQgY4My06MXXV
xTrVkkPqYaKerA6JHK89GRHqZFOV6/acOZ8PE1BDQ6cb4EhY+FeyEI8CKo18kUDd
XoUttISMIElnCpjbNPoxLDbt66CrUIb1gz8Xe2YxWFMib9V1Seq0xvmMarbUTXRg
aeql1spWOEJJf3GR/qpu13AmPt9lTD2t0gDpY+MeB/guShJxm1pU3TEJ/V7FwxBn
vJWfNI82RBHCzlUt0aGryYjw19bmgc3Z1st2GMU8WGiDeYFx6nrMUn1QzsWi7QuW
k6ZVhkc0mdzXBVyeymWcZE87IKNvlwtOJF3rUpQkvSBxOw3ivLvDVILWLKaDxXCk
ncPTFenz4ETNJ0bPQFcf3q45+Bb03YiifqTfNlnE5/+57fvd+J0INYIWlI91rsHP
sjppv6K1BzrAe5LPvGTN
=WyIX
-END PGP SIGNATURE-

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



Re: Out of memory exception

2014-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Randeep,

On 1/23/14, 12:17 PM, Randeep wrote:
 Thanks. That worked. Anything unusual? Garbage collection is
 happening too often?
 
 [root@server logs]# cat
 /usr/share/apache-tomcat-6.0.37/logs/heap.log 1.910: [GC
 16192K-1923K(260160K), 0.0150080 secs] 2.454: [GC
 18115K-3151K(260160K), 0.0137140 secs] 2.760: [GC
 19343K-3309K(260160K), 0.0058220 secs] 3.648: [GC
 19501K-4446K(260160K), 0.0062870 secs] 4.000: [GC
 20638K-5063K(260160K), 0.0080940 secs] 4.305: [GC
 21255K-6302K(260160K), 0.0060890 secs] 4.598: [GC
 22494K-6323K(260160K), 0.0062020 secs] 5.664: [GC
 22515K-7098K(260160K), 0.0055070 secs] 6.980: [GC
 23290K-8708K(260160K), 0.0176410 secs] 7.332: [GC
 24900K-12045K(260160K), 0.0179400 secs] 7.794: [Full GC
 24591K-12864K(260160K), 0.2538960 secs] 8.476: [GC
 29184K-14200K(260288K), 0.0080560 secs] 8.939: [GC
 30520K-15401K(260288K), 0.0407000 secs] 9.379: [GC
 31721K-16897K(260288K), 0.0099850 secs] 9.603: [GC
 33217K-16652K(260288K), 0.0649140 secs] 10.498: [GC
 32972K-17768K(260288K), 0.0068540 secs] 10.885: [GC
 34088K-18538K(260288K), 0.0084330 secs] 11.225: [GC
 34858K-19584K(260288K), 0.0071730 secs] 11.466: [GC
 35904K-20313K(260288K), 0.0050570 secs] 12.128: [GC
 36633K-20565K(260288K), 0.0042210 secs] 12.385: [Full GC
 26015K-20204K(260288K), 0.2847340 secs] 13.817: [GC
 36524K-22174K(260288K), 0.0155690 secs] 14.127: [GC
 38494K-25303K(260288K), 0.0816490 secs] 14.671: [GC
 41623K-27150K(260288K), 0.0436660 secs] 15.173: [GC
 43470K-28757K(260288K), 0.0140720 secs] 15.414: [Full GC
 32030K-28926K(260288K), 0.3071990 secs] 65.004: [GC
 45310K-31775K(260352K), 0.0105440 secs] [root@server logs]#

Do what I do: write a Perl script to pull-apart the data from above
into something useful, like CSV, and then use a spreadsheet to graph
the data. Graphing heap data *really* helps. Looking at numbers is ...
useless.

- -chris

 On Thu, Jan 23, 2014 at 10:33 PM, André Warnier a...@ice-sa.com
 wrote:
 
 Randeep wrote:
 
 Hi all, Thanks a lot for valuable points. Here the information
 you guys asked and the changes I made.
 
 OS : CentOS release 5.4 (Final) 
 httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+
 apache-tomcat-6.0.37
 
 I installed httpd using yum. Downloaded tomcat from Apache as
 compressed archive(tar.gz)
 
 I'm using following startup script. [root@server ~]# cat
 /etc/init.d/tomcat6 #!/bin/bash # description: Tomcat Start
 Stop Restart # processname: tomcat # chkconfig: 234 20 80 
 JAVA_HOME=/usr/java/default export JAVA_HOME 
 PATH=$JAVA_HOME/bin:$PATH export PATH 
 CATALINA_HOME=/usr/share/apache-tomcat-6.0.37 case $1 in 
 start) sh $CATALINA_HOME/bin/startup.sh ;; stop) sh
 $CATALINA_HOME/bin/shutdown.sh ;; restart) sh
 $CATALINA_HOME/bin/shutdown.sh sh
 $CATALINA_HOME/bin/startup.sh ;; esac exit 0
 
 As you said, I removed the JAVA_OPTS declaration from
 .bash_profile and I have created setenv.sh and set JAVA_OPTS in
 it. [root@server bin]# pwd /usr/share/apache-tomcat-6.0.37/bin
 
 [root@server bin]# cat setenv.sh export JAVA_OPTS='-Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log'
 
 Now it shows in grep. [root@server bin]# ps aux | grep
 Bootstrap root  1100 33.7  5.4 707052 95240 pts/0Sl
 11:29   0:06 /usr/java/default/bin/java 
 -Djava.util.logging.config.file=/usr/share/apache-tomcat- 
 6.0.37/conf/logging.properties 
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

 
- -Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log 
 -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed
 -classpath /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar 
 -Dcatalina.base=/usr/share/apache-tomcat-6.0.37 
 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37 
 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp 
 org.apache.catalina.startup.Bootstrap start root  1158  0.0
 0.0   3932   692 pts/0R+   11:29   0:00 grep Bootstrap 
 [root@server bin]#
 
 But nothing came in heap.log. So I better monitor this and if I
 get the OOM again I have to increase Max limit!
 
 
 Maybe you should provide a full path for the -Xloggc option ?
 
 
 
 
 On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz  
 ch...@christopherschultz.net wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Randeep,
 
 On 1/23/14, 7:43 AM, Randeep wrote:
 
 I'm getting out of memory exception errors.
 
 :(
 
 Exception in thread Timer-1 java.lang.OutOfMemoryError:
 Java heap
 space at java.util.Arrays.copyOf(Arrays.java:2882) at
 
 java.lang.AbstractStringBuilder.expandCapacity(
 AbstractStringBuilder.java:100)
 
 
 at
 
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)



 
at java.lang.StringBuffer.append(StringBuffer.java:320)
 
 at org.json.JSONArray.toString(JSONArray.java:834) at 
 org.json.JSONObject.valueToString(JSONObject.java:1359) at 
 org.json.JSONObject.toString(JSONObject.java:1233) at 
 com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503

Re: Out of memory exception

2014-01-23 Thread Ray Holme
Doing anything as root conceals the errors. Tomcat is no exception and changing 
it to a real user makes your testing complete.





On Thursday, January 23, 2014 12:36 PM, Daniel Mikusa dmik...@gopivotal.com 
wrote:
 
On Jan 23, 2014, at 11:38 AM, Randeep randeep...@gmail.com wrote:

 Hi all,
 Thanks a lot for valuable points. Here the information you guys asked and
 the changes I made.
 
 OS : CentOS release 5.4 (Final)
 httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37
 
 I installed httpd using yum.
 Downloaded tomcat from Apache as compressed archive(tar.gz)
 
 I'm using following startup script.
 [root@server ~]# cat /etc/init.d/tomcat6
 #!/bin/bash
 # description: Tomcat Start Stop Restart
 # processname: tomcat
 # chkconfig: 234 20 80
 JAVA_HOME=/usr/java/default
 export JAVA_HOME
 PATH=$JAVA_HOME/bin:$PATH
 export PATH
 CATALINA_HOME=/usr/share/apache-tomcat-6.0.37
 case $1 in
 start)
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 stop)
 sh $CATALINA_HOME/bin/shutdown.sh
 ;;
 restart)
 sh $CATALINA_HOME/bin/shutdown.sh
 sh $CATALINA_HOME/bin/startup.sh
 ;;
 esac
 exit 0
 
 As you said, I removed the JAVA_OPTS declaration from .bash_profile and I
 have created setenv.sh and set JAVA_OPTS in it.
 [root@server bin]# pwd
 /usr/share/apache-tomcat-6.0.37/bin
 
 [root@server bin]# cat setenv.sh
 export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k

 -verbose:gc -Xloggc:heap.log’

Based on the name of the file you’re listing, it makes me think you’re 
confusing what this option does.  It’s a garbage collection log.  While that 
shows some info about the heap, it’s mainly targeted towards knowing what’s 
happening with GC in your process. 

I can’t help but think you might be looking for 
-XX:+HeapDumpOnOutOfMemoryError, which generates a heap dump when you get an 
OOME.

 
 Now it shows in grep.
 [root@server bin]# ps aux | grep Bootstrap
 root      1100 33.7  5.4 707052 95240 pts/0    Sl   11:29   0:06
 /usr/java/default/bin/java
 -Djava.util.logging.config.file=/usr/share/apache-tomcat-6.0.37/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms256m
 -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log
 -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath
 /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar
 -Dcatalina.base=/usr/share/apache-tomcat-6.0.37
 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37
 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp
 org.apache.catalina.startup.Bootstrap start
 root      1158  0.0  0.0   3932   692 pts/0    R+   11:29   0:00 grep
 Bootstrap
 [root@server bin]#
 
 But nothing came in heap.log.

Try using this option instead:  -Xloggc:$CATALINA_BASE/logs/heap.log”

That should put the file in your “logs” directory.

Dan

 So I better monitor this and if I get the OOM
 again I have to increase Max limit!
 
 
 On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Randeep,
 
 On 1/23/14, 7:43 AM, Randeep wrote:
 I'm getting out of memory exception errors.
 
 :(
 
 Exception in thread Timer-1 java.lang.OutOfMemoryError: Java heap
 space at java.util.Arrays.copyOf(Arrays.java:2882) at
 
 java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
 
 
 at
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
 
 
 at java.lang.StringBuffer.append(StringBuffer.java:320)
 at org.json.JSONArray.toString(JSONArray.java:834) at
 org.json.JSONObject.valueToString(JSONObject.java:1359) at
 org.json.JSONObject.toString(JSONObject.java:1233) at
 com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at
 com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at
 java.util.TimerThread.mainLoop(Timer.java:512) at
 java.util.TimerThread.run(Timer.java:462)
 
 If you are trying to serialize huge JSON objects, this is going to
 happen. I'm not sure if JSON is as smart as the Java Serialization
 engine, but if you have a circular-reference in your object graph, I'd
 be willing to bet that the JSON serializer will run forever and
 exhaust your heap.
 
 It's also possible that you simply have a tiny heap and need more,
 especially if you aren't currently setting any heap parameters.
 
 Is there anyway to see currently set jvm heap size details? Any
 linux commands.
 
 You can attach any profiler to your app. Good luck catching this in
 the act, though, in production.
 
 You can also use jmap -heap which comes with the JDK. Just point it
 at a process and you'll get a heap summary from a running JVM. Make
 sure your JVM and jmap version match.
 
 I have tried creating setenv.sh and putting the new parameters in
 it. but echo $JAVA_OPTS was not giving any value.
 
 setenv.sh is run during Tomcat startup. Running echo $JAVA_OPTS from
 the command-line isn't going to reveal anything. What you want to do
 is modify setenv.sh, re-launch Tomcat, and then look at the process
 command line... something

Re: [OT] Out of memory exception - top posting

2014-01-23 Thread André Warnier

Ray Holme wrote:

Doing anything as root conceals the errors. Tomcat is no exception and changing 
it to a real user makes your testing complete.



Guys,
I think that the rule (or should I say suggestion ?) on this list to *not* top-post is not 
working.
Either people don't read the rules, or they do not understand the rule, or they just 
ignore it.


Anyway, it seems that we're spending more time lately asking people to not top-post, than 
actually providing answers to their questions.


So I have a few suggestions of my own :
- have the list software add a message in *bold* to all messages, indicating that top 
posts will be *ignored* ?

- just ignore top-posts ?
- drop the rule ?


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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Leo Donahue
On Thu, Jan 23, 2014 at 12:08 PM, André Warnier a...@ice-sa.com wrote:

 it seems that we're spending more time lately asking people to not
 top-post, than actually providing answers to their questions.

 So I have a few suggestions of my own :
 - have the list software add a message in *bold* to all messages, indicating
 that top posts will be *ignored* ?
 - just ignore top-posts ?
 - drop the rule ?


Does this topic go back to the usenet days of the early 80s?  Top
posting vs bottom posting?

It is so customary to simply reply to people in the MS Outlook world
that all of those people get used to top posting, because they know
nothing different, until they come here.

I'm getting used to bottom posting, but it drives my co-workers crazy
and is not proper form where I work.  I think this we might be chasing
the wind here.

Leo

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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Konstantin Kolinko
2014/1/23 André Warnier a...@ice-sa.com:
 Ray Holme wrote:

 Doing anything as root conceals the errors. Tomcat is no exception and
 changing it to a real user makes your testing complete.


 Guys,
 I think that the rule (or should I say suggestion ?) on this list to *not*
 top-post is not working.
 Either people don't read the rules, or they do not understand the rule, or
 they just ignore it.

 Anyway, it seems that we're spending more time lately asking people to not
 top-post, than actually providing answers to their questions.

 So I have a few suggestions of my own :
 - have the list software add a message in *bold* to all messages, indicating
 that top posts will be *ignored* ?

One of those rules is do not use HTML formatting. So you cannot use bold.

One of real issues that I fixed several times is that the references
to our mailing list
should point to the Mailing Lists page
(http://tomcat.apache.org/lists.html#tomcat-users),
instead of just providing the subscription address.
I might have missed to fix some of those.

 - just ignore top-posts ?

That is what I usually do.

 - drop the rule ?


Best regards,
Konstantin Kolinko

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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Mark Eggers

On 1/23/2014 11:21 AM, Leo Donahue wrote:

On Thu, Jan 23, 2014 at 12:08 PM, André Warnier a...@ice-sa.com wrote:


it seems that we're spending more time lately asking people to not
top-post, than actually providing answers to their questions.

So I have a few suggestions of my own :
- have the list software add a message in *bold* to all messages, indicating
that top posts will be *ignored* ?
- just ignore top-posts ?
- drop the rule ?



Does this topic go back to the usenet days of the early 80s?  Top
posting vs bottom posting?

It is so customary to simply reply to people in the MS Outlook world
that all of those people get used to top posting, because they know
nothing different, until they come here.

I'm getting used to bottom posting, but it drives my co-workers crazy
and is not proper form where I work.  I think this we might be chasing
the wind here.

Leo


There are probably lots of reasons for top-posting, and I don't think we 
can lay the blame on the MS Outlook world. The people I work with use a 
mixture of Thunderbird, web-based interfaces, and Outlook.


Every one of them top-posts :-(.

I think top-posting says a lot about the thought process of the poster. 
To me it says, my issue, problem, answer, concern is of paramount 
importance. You should remember everything about my issue. After all, I 
remember everything about my issue.


The attitude is probably not malicious, but more along the lines of a 
lack of perspective.


Two things to consider when posting to a public mailing list:

1. There are lots of topics - people don't keep up with all of them
2. Many people have more pressing concerns - your issue isn't one of
   them

In a work environment, top-posting may be rational since hopefully 
you're getting mail on issues of primary importance.


In an open mailing list, bottom-posting or in-line posting makes sense 
because contributors are doing this on a voluntary basis (beats 
rewriting a build process in Maven for example :-p). Also, your concern 
is most likely not their concern. In short, the contributors aren't 
spending as many cycles on the issue as the original poster is.


This goes along with providing a complete description of your 
environment and how you arrived at the problem. Within a work 
environment, there's shared knowledge. In a public mailing list, no one 
knows but the original poster.


Oh, and brevity is probably a good model (shoot me now).

. . . . just my two cents
/mde/



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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Ray Holme
Unfortunately that will mean that all folks who use yahoo need to copy and 
paste all messages.

I have tried reply and reply to conversation but with the new yahoo 
paradigm (a couple months ago, they changed things) - it no longer allows me to 
post inside of an email as it did in the past.

I understand your frustration and will try to always fully copy a message to an 
editor in order to allow me to edit and NOT top post.

Apologies and my 1/2 cent.

rah




On Thursday, January 23, 2014 2:44 PM, Mark Eggers its_toas...@yahoo.com 
wrote:
 
On 1/23/2014 11:21 AM, Leo Donahue wrote:
 On Thu, Jan 23, 2014 at 12:08 PM, André Warnier a...@ice-sa.com wrote:

 it seems that we're spending more time lately asking people to not
 top-post, than actually providing answers to their questions.

 So I have a few suggestions of my own :
 - have the list software add a message in *bold* to all messages, indicating
 that top posts will be *ignored* ?
 - just ignore top-posts ?
 - drop the rule ?


 Does this topic go back to the usenet days of the early 80s?  Top
 posting vs bottom posting?

 It is so customary to simply reply to people in the MS Outlook world
 that all of those people get used to top posting, because they know
 nothing different, until they come here.

 I'm getting used to bottom posting, but it drives my co-workers crazy
 and is not proper form where I work.  I think this we might be chasing
 the wind here.

 Leo

There are probably lots of reasons for top-posting, and I don't think we 
can lay the blame on the MS Outlook world. The people I work with use a 
mixture of Thunderbird, web-based interfaces, and Outlook.

Every one of them top-posts :-(.

I think top-posting says a lot about the thought process of the poster. 
To me it says, my issue, problem, answer, concern is of paramount 
importance. You should remember everything about my issue. After all, I 
remember everything about my issue.

The attitude is probably not malicious, but more along the lines of a 
lack of perspective.

Two things to consider when posting to a public mailing list:

1. There are lots of topics - people don't keep up with all of them
2. Many people have more pressing concerns - your issue isn't one of
    them

In a work environment, top-posting may be rational since hopefully 
you're getting mail on issues of primary importance.

In an open mailing list, bottom-posting or in-line posting makes sense 
because contributors are doing this on a voluntary basis (beats 
rewriting a build process in Maven for example :-p). Also, your concern 
is most likely not their concern. In short, the contributors aren't 
spending as many cycles on the issue as the original poster is.

This goes along with providing a complete description of your 
environment and how you arrived at the problem. Within a work 
environment, there's shared knowledge. In a public mailing list, no one 
knows but the original poster.

Oh, and brevity is probably a good model (shoot me now).

. . . . just my two cents
/mde/




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

RE: [OT] Out of memory exception - top posting

2014-01-23 Thread Caldarale, Charles R
 From: Ray Holme [mailto:rayho...@yahoo.com] 
 Subject: Re: [OT] Out of memory exception - top posting

 Unfortunately that will mean that all folks who use yahoo need to 
 copy and paste all messages.

It appears that Mark E has no trouble with in-line posting from yahoo; perhaps 
he can share his technique.

 - 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: [OT] Out of memory exception - top posting

2014-01-23 Thread Mark Eggers
Reply at the bottom . . . and one in-line for fun.


 On Thursday, January 23, 2014 12:22 PM, Ray Holme rayho...@yahoo.com wrote:
  Unfortunately that will mean that all folks who use yahoo need to copy and 
  paste 
 all messages.
 
 I have tried reply and reply to conversation but with 
 the new yahoo paradigm (a couple months ago, they changed things) - it no 
 longer 
 allows me to post inside of an email as it did in the past.
 

This is an in-line reply with Yahoo's web mail interface.

 I understand your frustration and will try to always fully copy a message to 
 an 
 editor in order to allow me to edit and NOT top post.
 
 Apologies and my 1/2 cent.
 
 rah
 
 
 
 
 
 On Thursday, January 23, 2014 2:44 PM, Mark Eggers its_toas...@yahoo.com 
 wrote:
 
 On 1/23/2014 11:21 AM, Leo Donahue wrote:
  On Thu, Jan 23, 2014 at 12:08 PM, André Warnier a...@ice-sa.com 
 wrote:
 
  it seems that we're spending more time lately asking people to not
  top-post, than actually providing answers to their questions.
 
  So I have a few suggestions of my own :
  - have the list software add a message in *bold* to all messages, 
 indicating
  that top posts will be *ignored* ?
  - just ignore top-posts ?
  - drop the rule ?
 
 
  Does this topic go back to the usenet days of the early 80s?  Top
  posting vs bottom posting?
 
  It is so customary to simply reply to people in the MS Outlook world
  that all of those people get used to top posting, because they know
  nothing different, until they come here.
 
  I'm getting used to bottom posting, but it drives my co-workers crazy
  and is not proper form where I work.  I think this we might be chasing
  the wind here.
 
  Leo
 
 There are probably lots of reasons for top-posting, and I don't think we 
 can lay the blame on the MS Outlook world. The people I work with use a 
 mixture of Thunderbird, web-based interfaces, and Outlook.
 
 Every one of them top-posts :-(.
 
 I think top-posting says a lot about the thought process of the poster. 
 To me it says, my issue, problem, answer, concern is of paramount 
 importance. You should remember everything about my issue. After all, I 
 remember everything about my issue.
 
 The attitude is probably not malicious, but more along the lines of a 
 lack of perspective.
 
 Two things to consider when posting to a public mailing list:
 
 1. There are lots of topics - people don't keep up with all of them
 2. Many people have more pressing concerns - your issue isn't one of
     them
 
 In a work environment, top-posting may be rational since hopefully 
 you're getting mail on issues of primary importance.
 
 In an open mailing list, bottom-posting or in-line posting makes sense 
 because contributors are doing this on a voluntary basis (beats 
 rewriting a build process in Maven for example :-p). Also, your concern 
 is most likely not their concern. In short, the contributors aren't 
 spending as many cycles on the issue as the original poster is.
 
 This goes along with providing a complete description of your 
 environment and how you arrived at the problem. Within a work 
 environment, there's shared knowledge. In a public mailing list, no one 
 knows but the original poster.
 
 Oh, and brevity is probably a good model (shoot me now).
 
 . . . . just my two cents
 /mde/


Hmm,

I normally don't use the web interface. I access my Yahoo account via IMAP and 
Thunderbird.

Just for kicks, I thought I would access it via the web interface and reply to 
your message.

On a Windows box, Ctrl-End gets me to the end of the message. I then trim off 
the mailing list footer, and finally type in my reply.

Voila - no top-posting.

I don't know about the tablet version or phone version of Yahoo! mail.

/mde/

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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Ray Holme





On Thursday, January 23, 2014 3:41 PM, Mark Eggers its_toas...@yahoo.com 
wrote:
 
Reply at the bottom . . . and one in-line for fun.


 On Thursday, January 23, 2014 12:22 PM, Ray Holme rayho...@yahoo.com wrote:
  Unfortunately that will mean that all folks who use yahoo need to copy and 
  paste 
 all messages.
 
 I have tried reply and reply to conversation but with 
 the new yahoo paradigm (a couple months ago, they changed things) - it no 
 longer 
 allows me to post inside of an email as it did in the past.
 

This is an in-line reply with Yahoo's web mail interface.

 I understand your frustration and will try to always fully copy a message to 
 an 
 editor in order to allow me to edit and NOT top post.
 
 Apologies and my 1/2 cent.
 
 rah
 
 
 
 
 
 On Thursday, January 23, 2014 2:44 PM, Mark Eggers its_toas...@yahoo.com 
 wrote:
 
 On 1/23/2014 11:21 AM, Leo Donahue wrote:
  On Thu, Jan 23, 2014 at 12:08 PM, André Warnier a...@ice-sa.com 
 wrote:
 
  it seems that we're spending more time lately asking people to not
  top-post, than actually providing answers to their questions.
 
  So I have a few suggestions of my own :
  - have the list software add a message in *bold* to all messages, 
 indicating
  that top posts will be *ignored* ?
  - just ignore top-posts ?
  - drop the rule ?
 
 
  Does this topic go back to the usenet days of the early 80s?  Top
  posting vs bottom posting?
 
  It is so customary to simply reply to people in the MS Outlook world
  that all of those people get used to top posting, because they know
  nothing different, until they come here.
 
  I'm getting used to bottom posting, but it drives my co-workers crazy
  and is not proper form where I work.  I think this we might be chasing
  the wind here.
 
  Leo
 
 There are probably lots of reasons for top-posting, and I don't think we 
 can lay the blame on the MS Outlook world. The people I work with use a 
 mixture of Thunderbird, web-based interfaces, and Outlook.
 
 Every one of them top-posts :-(.
 
 I think top-posting says a lot about the thought process of the poster. 
 To me it says, my issue, problem, answer, concern is of paramount 
 importance. You should remember everything about my issue. After all, I 
 remember everything about my issue.
 
 The attitude is probably not malicious, but more along the lines of a 
 lack of perspective.
 
 Two things to consider when posting to a public mailing list:
 
 1. There are lots of topics - people don't keep up with all of them
 2. Many people have more pressing concerns - your issue isn't one of
     them
 
 In a work environment, top-posting may be rational since hopefully 
 you're getting mail on issues of primary importance.
 
 In an open mailing list, bottom-posting or in-line posting makes sense 
 because contributors are doing this on a voluntary basis (beats 
 rewriting a build process in Maven for example :-p). Also, your concern 
 is most likely not their concern. In short, the contributors aren't 
 spending as many cycles on the issue as the original poster is.
 
 This goes along with providing a complete description of your 
 environment and how you arrived at the problem. Within a work 
 environment, there's shared knowledge. In a public mailing list, no one 
 knows but the original poster.
 
 Oh, and brevity is probably a good model (shoot me now).
 
 . . . . just my two cents
 /mde/


Hmm,

I normally don't use the web interface. I access my Yahoo account via IMAP and 
Thunderbird.

Just for kicks, I thought I would access it via the web interface and reply to 
your message.

On a Windows box, Ctrl-End gets me to the end of the message. I then trim off 
the mailing list footer, and finally type in my reply.

Voila - no top-posting.

I don't know about the tablet version or phone version of Yahoo! mail.


/mde/

My bad - I did NOT see the button to include message history. Sorry to all. And 
I am not using a table, just the web interface with Linux.  I dug a while and 
there it was.


Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

André,

On 1/23/14, 2:08 PM, André Warnier wrote:
 Ray Holme wrote:
 Doing anything as root conceals the errors. Tomcat is no
 exception and changing it to a real user makes your testing
 complete.
 
 
 Guys, I think that the rule (or should I say suggestion ?) on this
 list to *not* top-post is not working. Either people don't read the
 rules, or they do not understand the rule, or they just ignore it.
 
 Anyway, it seems that we're spending more time lately asking people
 to not top-post, than actually providing answers to their
 questions.
 
 So I have a few suggestions of my own : - have the list software
 add a message in *bold* to all messages, indicating that top posts
 will be *ignored* ? - just ignore top-posts ? - drop the rule ?

- -1 to all three. Tomcat (and the ASF as a whole) is a community, and
our job as ... vocal? members of the community is to help meet the
needs of that community. If top-posting irritates us, we just have to
ask that people help us help themselves.

But simply summarily ignoring top-posted replies is childish. If the
top-posting becomes intolerable (it happens sometimes, especially when
there is a complex thread going on and someone - usually the OP -
continues to top-post), then feel free to stop replying. But don't
crucify people for top-posting alone.

Some people can't figure out how to reply properly. Just gently remind
posters of the rules and get back to business. There is no need to
reply to a post by simply saying Don't top-post and leaving it at
that. Save your own time and the time of everyone else on the list
(and the archives, where useless messages can't be removed) and just
skip that step. If you want to reply meaningfully, feel free to add
the don't top-post somewhere in your reply.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS4ZIdAAoJEBzwKT+lPKRY+NIP/Aptl3OrcVu85Gp05ekxdds5
x1XmCBkdNnlz9ihom4hSvlm633Xg1Im1jQi+tiyY1ZdAgpzYV3K8zM5CykhuiuxN
aWjvlCcKKKkH+6u5WfZQF3LwUFkRFz9WaHC+9LqMuDbHfdVJEuszkzRve6/njtcs
FZ54RQQ2Af3x+8UWe9fdb9OoQFCebG08UqB2IgaYIQ7dp3nqlLke/+t+l3Ns0dU1
SLBQbZP3pcMiY9tU4cPTO+F025oITjdAsj8x6JapkA2IapxEsSQCG/35rERFDPUP
mZF9jc1r8jz7PtgfcdSD6FfHi5AZfya4OJxzZKRQWEgm1Lp2UOeKaBwszNSojVqq
kfxeDjVeFdRxsXEY1a8rlNNNXbfDVjeHV2IOm1LgzelpWlYf9daRKPo0dVGxOnRK
4Blkj1LcNbInWBBk8DfPfpfz3svsn6wNcv9qhgCCNJC5e3jyCjI5aahEij8lKqha
hHe9u9xqaPp+47AmeCKa5QTaRuJE8ExTnpaUNNTRkmYnTmy/mLqouEsMHVbRlqgX
ujvhg4jqP/ANlbe+ZXpHBeBjDeAWhqhP6f9wWRibZ8BXQdOPFpyNfIrHFpaMRsto
jWcHpF2qHcOPuY3xSWvTPOwUCaVpWQt3IPWqIf+rVbdtCkzhd+jL+smo9UX82MaB
PS8sanZTLZ0e8UrxTxzm
=nlVi
-END PGP SIGNATURE-

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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Milo Hyson
On Jan 23, 2014, at 2:05 PM, Christopher Schultz ch...@christopherschultz.net 
wrote:

 Some people can't figure out how to reply properly. Just gently remind
 posters of the rules and get back to business. There is no need to
 reply to a post by simply saying Don't top-post and leaving it at
 that. Save your own time and the time of everyone else on the list
 (and the archives, where useless messages can't be removed) and just
 skip that step. If you want to reply meaningfully, feel free to add
 the don't top-post somewhere in your reply.

I agree. For some people, it may be their first post to the group (or even 
their first post to ANY group). They may simply not know community conventions. 
Don't want to scare them off.

- Milo Hyson
Chief Scientist
CyberLife Labs, Inc.


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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread André Warnier

Christopher,

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

André,

On 1/23/14, 2:08 PM, André Warnier wrote:

Ray Holme wrote:

Doing anything as root conceals the errors. Tomcat is no
exception and changing it to a real user makes your testing
complete.


Guys, I think that the rule (or should I say suggestion ?) on this
list to *not* top-post is not working. Either people don't read the
rules, or they do not understand the rule, or they just ignore it.

Anyway, it seems that we're spending more time lately asking people
to not top-post, than actually providing answers to their
questions.

So I have a few suggestions of my own : - have the list software
add a message in *bold* to all messages, indicating that top posts
will be *ignored* ? - just ignore top-posts ? - drop the rule ?


- -1 to all three. Tomcat (and the ASF as a whole) is a community, and
our job as ... vocal? members of the community is to help meet the
needs of that community. If top-posting irritates us, we just have to
ask that people help us help themselves.

But simply summarily ignoring top-posted replies is childish. If the
top-posting becomes intolerable (it happens sometimes, especially when
there is a complex thread going on and someone - usually the OP -
continues to top-post), then feel free to stop replying. But don't
crucify people for top-posting alone.

Some people can't figure out how to reply properly. Just gently remind
posters of the rules and get back to business. There is no need to
reply to a post by simply saying Don't top-post and leaving it at
that. Save your own time and the time of everyone else on the list
(and the archives, where useless messages can't be removed) and just
skip that step. If you want to reply meaningfully, feel free to add
the don't top-post somewhere in your reply.



In a general sense, I do agree with all of that.  Be tolerant of what you receive, and 
strict in what you produce and that kind of thing.


It's just that top-posting /is/ really annoying on this kind of list.
And also that it takes quite a lot of energy to politely ask someone to not top-post, and 
give them the reason why, and point them to the list rules.


Might there be some kind of macro in the Tomcat list server, which would allow us to 
paste such a statement into a response, with just a couple of keystrokes ?


As a matter of fact, a few such macros would come in handy. On a historical and 
statistical base :

[TOP] Please don't top-post, because..
[VER] Please provide Tomcat version, Java version, platform OS  version
[OLD] That version of Tomcat is %d years old. You should upgrade to the latest version, 
which has many more features and fixes for the latest security issues.
[CONF] Can you post the relevant bits of your configuration here (server.xml) ? Please 
paste it in-line, don't send it as attachment, the list strips them. And remove comments 
and any sensitive information (passwords etc.)

[RTFM] Please check the on-line documentation at http://tomcat.apache.org
[SMART] http://www.catb.org/~esr/faqs/smart-questions.html
[PAW] Patches are always welcome
[HTTPD] This is the Apache Tomcat list, your question relates to Apache httpd, see 
http://httpd.apache.org

[SPEC] Please check the Java Servlet Specification at ..
[LAZY] http://lmgtfy.com/
[COMP101] Is this a school exercise ?
[BUG] It's not a bug, it's a feature
[FEAT] Could you create a Bugzilla entry ?
[ASAP] Tomcat is open source and free. This list is manned by volunteers. If you would 
prefer instant gratification, please consult the list of commercial Tomcat consultants at..

[CAPS] (alias of [ASAP])
[$] (alias of [ASAP])
[CON] It's Context, with a capital C
[CON2] Don't do that (put your Context in server.xml).
[2C] Just my 2 cent

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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

André,

On 1/23/14, 6:09 PM, André Warnier wrote:
 Christopher,
 
 Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
 
 André,
 
 On 1/23/14, 2:08 PM, André Warnier wrote:
 Ray Holme wrote:
 Doing anything as root conceals the errors. Tomcat is no 
 exception and changing it to a real user makes your testing 
 complete.
 
 Guys, I think that the rule (or should I say suggestion ?) on 
 this list to *not* top-post is not working. Either people
 don't read the rules, or they do not understand the rule, or
 they just ignore it.
 
 Anyway, it seems that we're spending more time lately asking 
 people to not top-post, than actually providing answers to 
 their questions.
 
 So I have a few suggestions of my own : - have the list 
 software add a message in *bold* to all messages, indicating 
 that top posts will be *ignored* ? - just ignore top-posts ? - 
 drop the rule ?
 
 - -1 to all three. Tomcat (and the ASF as a whole) is a 
 community, and our job as ... vocal? members of the community is 
 to help meet the needs of that community. If top-posting 
 irritates us, we just have to ask that people help us help 
 themselves.
 
 But simply summarily ignoring top-posted replies is childish. If 
 the top-posting becomes intolerable (it happens sometimes, 
 especially when there is a complex thread going on and someone - 
 usually the OP - continues to top-post), then feel free to stop 
 replying. But don't crucify people for top-posting alone.
 
 Some people can't figure out how to reply properly. Just gently 
 remind posters of the rules and get back to business. There is
 no need to reply to a post by simply saying Don't top-post and 
 leaving it at that. Save your own time and the time of everyone 
 else on the list (and the archives, where useless messages can't 
 be removed) and just skip that step. If you want to reply 
 meaningfully, feel free to add the don't top-post somewhere in 
 your reply.
 
 
 In a general sense, I do agree with all of that.  Be tolerant of 
 what you receive, and strict in what you produce and that kind of 
 thing.
 
 It's just that top-posting /is/ really annoying on this kind of 
 list. And also that it takes quite a lot of energy to politely ask 
 someone to not top-post, and give them the reason why, and point 
 them to the list rules.
 
 Might there be some kind of macro in the Tomcat list server, 
 which would allow us to paste such a statement into a response, 
 with just a couple of keystrokes ?
 
 As a matter of fact, a few such macros would come in handy. On a 
 historical and statistical base : [TOP] Please don't top-post, 
 because.. [VER] Please provide Tomcat version, Java version, 
 platform OS  version [OLD] That version of Tomcat is %d years
 old. You should upgrade to the latest version, which has many more 
 features and fixes for the latest security issues. [CONF] Can you 
 post the relevant bits of your configuration here (server.xml) ? 
 Please paste it in-line, don't send it as attachment, the list 
 strips them. And remove comments and any sensitive information 
 (passwords etc.) [RTFM] Please check the on-line documentation at 
 http://tomcat.apache.org [SMART] 
 http://www.catb.org/~esr/faqs/smart-questions.html [PAW] Patches 
 are always welcome [HTTPD] This is the Apache Tomcat list, your 
 question relates to Apache httpd, see http://httpd.apache.org 
 [SPEC] Please check the Java Servlet Specification at .. [LAZY] 
 http://lmgtfy.com/ [COMP101] Is this a school exercise ? [BUG]
 It's not a bug, it's a feature [FEAT] Could you create a Bugzilla
 entry ? [ASAP] Tomcat is open source and free. This list is manned
 by volunteers. If you would prefer instant gratification, please 
 consult the list of commercial Tomcat consultants at.. [CAPS] 
 (alias of [ASAP]) [$] (alias of [ASAP]) [CON] It's Context, with a 
 capital C [CON2] Don't do that (put your Context in server.xml).
  [2C] Just my 2 cent

[ROOT] It's ROOT.war -- capitalization matters, even when using a
case-insensitive filesystem.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS4aryAAoJEBzwKT+lPKRYtLcP/1JHJO1omNO7zgXyl6CN3Kqu
D6W3wh8nyABycCDnUxQLDdkVOUe+cUJ/p9eW4U2TVMIp3Iqf9R6umvROSi0PJAu6
4rdGriR5TJbUigNiEy/pTiW06tZgsYH+3LGMetCvfG2tvz1Chd53CxDXAOwHiuFB
EGY6YHmJRPDc/6xQadCqRpyKSyfwHfmdCmxg22n+nMWW7cs+wMHdgHInMEj7tv1i
BwltfEK7mX27eJ7EsM54bo+96eVRexbjgL7qZ84SagXTk66JxPMXqxaoJyYqPXG8
KI04+Qf37UmrPJXLkJKXmjSzqSAFUV4RZa7D/VlPkBdBKPzqHwUKk3LMT5O27Xez
ZioFZrsbxrz+SEEjfRzh3HT67QcQ4L6imiUbuJ/zWfI9bBG9mgwaFyVQvD2kj9d7
8+Gic3xEa/AHM0BTwaQo7GLIihlH1EiTSoX03BRmp4Ch+FPlSBhaUCP1ZanMv7kb
YIdvxCcSOCDMulc5/Z0sVESH5Q5D4UNKlRqZZsbH2VjIi4HFoL/b60m7sDsXMjRQ
g9GgFeiNVhUHOYwmQhZXN7V9tEgWpk0wzt6q2Roz8IzG4UhMRx9X7xwCU1a3uG0/
wstnsKUrtxI4DGuf/nlHqmNnSQ65hCgzRb0F+/uh+Xx0DdX9oKtWU2fZNnvlc2SO
5Clo6OgXQYmkZZT39Poq
=HLmd

Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Mark Eggers

On 1/23/2014 3:51 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

André,

On 1/23/14, 6:09 PM, André Warnier wrote:

Christopher,

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE- Hash: SHA256

André,

On 1/23/14, 2:08 PM, André Warnier wrote:

Ray Holme wrote:

Doing anything as root conceals the errors. Tomcat is no
exception and changing it to a real user makes your testing
complete.


Guys, I think that the rule (or should I say suggestion ?) on
this list to *not* top-post is not working. Either people
don't read the rules, or they do not understand the rule, or
they just ignore it.

Anyway, it seems that we're spending more time lately asking
people to not top-post, than actually providing answers to
their questions.

So I have a few suggestions of my own : - have the list
software add a message in *bold* to all messages, indicating
that top posts will be *ignored* ? - just ignore top-posts ? -
drop the rule ?


- -1 to all three. Tomcat (and the ASF as a whole) is a
community, and our job as ... vocal? members of the community is
to help meet the needs of that community. If top-posting
irritates us, we just have to ask that people help us help
themselves.

But simply summarily ignoring top-posted replies is childish. If
the top-posting becomes intolerable (it happens sometimes,
especially when there is a complex thread going on and someone -
usually the OP - continues to top-post), then feel free to stop
replying. But don't crucify people for top-posting alone.

Some people can't figure out how to reply properly. Just gently
remind posters of the rules and get back to business. There is
no need to reply to a post by simply saying Don't top-post and
leaving it at that. Save your own time and the time of everyone
else on the list (and the archives, where useless messages can't
be removed) and just skip that step. If you want to reply
meaningfully, feel free to add the don't top-post somewhere in
your reply.



In a general sense, I do agree with all of that.  Be tolerant of
what you receive, and strict in what you produce and that kind of
thing.

It's just that top-posting /is/ really annoying on this kind of
list. And also that it takes quite a lot of energy to politely ask
someone to not top-post, and give them the reason why, and point
them to the list rules.

Might there be some kind of macro in the Tomcat list server,
which would allow us to paste such a statement into a response,
with just a couple of keystrokes ?

As a matter of fact, a few such macros would come in handy. On a
historical and statistical base : [TOP] Please don't top-post,
because.. [VER] Please provide Tomcat version, Java version,
platform OS  version [OLD] That version of Tomcat is %d years
old. You should upgrade to the latest version, which has many more
features and fixes for the latest security issues. [CONF] Can you
post the relevant bits of your configuration here (server.xml) ?
Please paste it in-line, don't send it as attachment, the list
strips them. And remove comments and any sensitive information
(passwords etc.) [RTFM] Please check the on-line documentation at
http://tomcat.apache.org [SMART]
http://www.catb.org/~esr/faqs/smart-questions.html [PAW] Patches
are always welcome [HTTPD] This is the Apache Tomcat list, your
question relates to Apache httpd, see http://httpd.apache.org
[SPEC] Please check the Java Servlet Specification at .. [LAZY]
http://lmgtfy.com/ [COMP101] Is this a school exercise ? [BUG]
It's not a bug, it's a feature [FEAT] Could you create a Bugzilla
entry ? [ASAP] Tomcat is open source and free. This list is manned
by volunteers. If you would prefer instant gratification, please
consult the list of commercial Tomcat consultants at.. [CAPS]
(alias of [ASAP]) [$] (alias of [ASAP]) [CON] It's Context, with a
capital C [CON2] Don't do that (put your Context in server.xml).
  [2C] Just my 2 cent


[ROOT] It's ROOT.war -- capitalization matters, even when using a
case-insensitive filesystem.

- -chris


Looks like the Quicktext addon for Thunderbird is perfect for this. I'll 
play around with adding keyboard shortcuts later.


- and now we're out in a swamp, in the middle of the forest, beyond the 
hills off-topic.


/mde/


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



Re: [OT] Out of memory exception - top posting

2014-01-23 Thread Howard W. Smith, Jr.
On Thu, Jan 23, 2014 at 2:08 PM, André Warnier a...@ice-sa.com wrote:


 Either people don't read the rules, or they do not understand the rule, or
 they just ignore it.


I agree. As a tomcat/tomee user, I joined the list, primarily, to listen in
on topics (that interest me), so I learned, very quickly, that top-posting
is not preferred, here.


 Anyway, it seems that we're spending more time lately asking people to not
 top-post, than actually providing answers to their questions.


Actually, it seems as though (tomcat lead) Mark Thomas (and others) have
been quite tolerable of recent top-posting, and still offer advice and
responses (sometimes) without the inevitable, 'don't top post'
phrase/response.

+1 for those always and/or unconditionally providing support to tomcat
users.

Also, gmail makes it easy for me to honor the rule against top-posting.


Re: Out of Memory exception (hotspot compilation)

2010-06-03 Thread Leon Rosenberg
On Thu, Jun 3, 2010 at 1:54 AM, Leon Kolchinsky lkolc...@gmail.com wrote:
 Yep :)
 You're right Charles.

 Thanks,
 Leon

From Leon To Leon,
an advice from personal experience and the golden rule of the tomcat
user list, write it down in glowing red letters on the wall you are
looking at most:
Charles is ALWAYS right. ;-)

regards
Leon

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



Re: Out of Memory exception (hotspot compilation)

2010-06-03 Thread Leon Kolchinsky
Hello,

Just wanted to update on this issue.
Atlassian support confirms that this is a known issue with Java 6.0_18 and
up.
So, the best solution for now is to use 6.0_17
Here - 
http://jira.atlassian.com/browse/CONF-19049http://jira.atlassian.com/browse/CONF-19049?focusedCommentId=197013#action_197013

Regards,
Leon Kolchinsky


On Thu, Jun 3, 2010 at 16:14, Leon Rosenberg rosenberg.l...@gmail.comwrote:

 On Thu, Jun 3, 2010 at 1:54 AM, Leon Kolchinsky lkolc...@gmail.com
 wrote:
  Yep :)
  You're right Charles.
 
  Thanks,
  Leon

 From Leon To Leon,
 an advice from personal experience and the golden rule of the tomcat
 user list, write it down in glowing red letters on the wall you are
 looking at most:
 Charles is ALWAYS right. ;-)

 regards
 Leon

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




RE: Out of Memory exception (hotspot compilation)

2010-06-02 Thread Caldarale, Charles R
 From: Leon Kolchinsky [mailto:lkolc...@gmail.com]
 Subject: Re: Out of Memory exception (hotspot compilation)
 
 I'd like to file a bug report on similar issue I had.
 Can you please tell me where can I do it?

Let's see what your original post had in it...

  Yesterday I've got this error in catalina.out and Tomcat died 
  (I'm attaching hs_err_pid5460.log file):
  #
  # A fatal error has been detected by the Java Runtime Environment:
  #
  # java.lang.OutOfMemoryError: requested 2147483664 bytes for Chunk::new.
  Out of swap space?
  #
  #  Internal Error (allocation.cpp:215), pid=5460, tid=1085901120
  #  Error: Chunk::new
  #
  # JRE version: 6.0_18-b07
  # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode 
  linux-amd64 )
  # An error report file with more information is saved as:
  # /tmp/hs_err_pid5460.log
  #
  # If you would like to submit a bug report, please visit:
  #   http://java.sun.com/webapps/bugreport/crash.jsp

Does that give you a hint?

 - 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: Out of Memory exception (hotspot compilation)

2010-06-02 Thread Leon Kolchinsky
Yep :)
You're right Charles.

Thanks,
Leon

On Wed, Jun 2, 2010 at 16:27, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Leon Kolchinsky [mailto:lkolc...@gmail.com]
  Subject: Re: Out of Memory exception (hotspot compilation)
 
  I'd like to file a bug report on similar issue I had.
  Can you please tell me where can I do it?

 Let's see what your original post had in it...

   Yesterday I've got this error in catalina.out and Tomcat died
   (I'm attaching hs_err_pid5460.log file):
   #
   # A fatal error has been detected by the Java Runtime Environment:
   #
   # java.lang.OutOfMemoryError: requested 2147483664 bytes for
 Chunk::new.
   Out of swap space?
   #
   #  Internal Error (allocation.cpp:215), pid=5460, tid=1085901120
   #  Error: Chunk::new
   #
   # JRE version: 6.0_18-b07
   # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode
   linux-amd64 )
   # An error report file with more information is saved as:
   # /tmp/hs_err_pid5460.log
   #
   # If you would like to submit a bug report, please visit:
   #   http://java.sun.com/webapps/bugreport/crash.jsp

 Does that give you a hint?

  - 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




Out of Memory exception (hotspot compilation)

2010-06-01 Thread Will Glass-Husain
Hi,

I noticed in recent emails that Leon Kolchinsky was running Tomcat and Java
requested 2GB of memory unexpectedly then died due to an out of memory
exception.

Bizarrely, the same thing happened to me today with very similar symptoms.
Specifically, the JVM requested 8GB of memory while hotspot was trying to
compile the exact same Velocity/Foreach method as Leon's example.  I'm
running 64 bit JDK 1.6.0_18-b07 / Tomcat 6.0.24 / APR 1.1.19.

I wanted to highlight this, (someone was talking about posting a bug
report).  Since it's the exact same method, I'm guessing the Velocity method
triggers a bug in the hotspot compilation.  Note that we've been running
this configuration for 5 months and I haven't seen this previously, so it's
probably rare.

Excerpt from hs_err

--
java.lang.OutOfMemoryError: requested 8589934608 bytes for Chunk::new. Out
of swap space?

Current thread (0x5449c800):  JavaThread CompilerThread0 daemon
[_thread_in_native, id=25458, stack(0x
40638000,0x40739000)]

Current CompileTask:
C2:2532  !
org.apache.velocity.runtime.directive.Foreach.render(Lorg/apache/velocity/context/InternalContextAdapter;Ljava/io/Writer;Lorg/apache/velocity/runtime/p
arser/node/Node;)Z (529 bytes)
---

[r...@main ~]# uname -a
Linux main 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:27:37 EST 2009 x86_64
x86_64 x86_64 GNU/Linux

--

CATALINA_OPTS=-Djava.awt.headless=true $CATALINA_OPTS
CATALINA_OPTS=-Xmx6G $CATALINA_OPTS
CATALINA_OPTS=-Xms500M $CATALINA_OPTS
CATALINA_OPTS=-server $CATALINA_OPTS
CATALINA_OPTS=-XX:PermSize=50M -XX:MaxPermSize=100M $CATALINA_OPTS
CATALINA_OPTS=-XX:+UseParallelOldGC $CATALINA_OPTS
CATALINA_OPTS=-XX:ThreadStackSize=512 $CATALINA_OPTS

WILL


RE: Out of Memory exception (hotspot compilation)

2010-06-01 Thread Caldarale, Charles R
 From: Will Glass-Husain [mailto:wglasshus...@gmail.com]
 Subject: Out of Memory exception (hotspot compilation)
 
 Specifically, the JVM requested 8GB of memory while hotspot was 
 trying to compile the exact same Velocity/Foreach method as Leon's
 example.  I'm running 64 bit JDK 1.6.0_18-b07

 Since it's the exact same method, I'm guessing the Velocity method
 triggers a bug in the hotspot compilation.  Note that we've been
 running this configuration for 5 months

Using the same JDK for those 5 months, or did you recently upgrade?

 - 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: Out of Memory exception (hotspot compilation)

2010-06-01 Thread Will Glass-Husain
The JDK has been the same since early February.  I don't think there's been
any other system upgrades.  (it's possible there was a upgrade to the OS I'm
not aware of, but definitely not the JDK).

WILL

On Tue, Jun 1, 2010 at 12:45 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Will Glass-Husain [mailto:wglasshus...@gmail.com]
  Subject: Out of Memory exception (hotspot compilation)
 
  Specifically, the JVM requested 8GB of memory while hotspot was
  trying to compile the exact same Velocity/Foreach method as Leon's
  example.  I'm running 64 bit JDK 1.6.0_18-b07

  Since it's the exact same method, I'm guessing the Velocity method
  triggers a bug in the hotspot compilation.  Note that we've been
  running this configuration for 5 months

 Using the same JDK for those 5 months, or did you recently upgrade?

  - 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: Out of Memory exception (hotspot compilation)

2010-06-01 Thread Leon Kolchinsky
Hmm,

I'd like to file a bug report on similar issue I had.
Can you please tell me where can I do it?


Cheers,
Leon

On Wed, Jun 2, 2010 at 06:46, Will Glass-Husain wglasshus...@gmail.comwrote:

 The JDK has been the same since early February.  I don't think there's been
 any other system upgrades.  (it's possible there was a upgrade to the OS
 I'm
 not aware of, but definitely not the JDK).

 WILL

 On Tue, Jun 1, 2010 at 12:45 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

   From: Will Glass-Husain [mailto:wglasshus...@gmail.com]
   Subject: Out of Memory exception (hotspot compilation)
  
   Specifically, the JVM requested 8GB of memory while hotspot was
   trying to compile the exact same Velocity/Foreach method as Leon's
   example.  I'm running 64 bit JDK 1.6.0_18-b07
 
   Since it's the exact same method, I'm guessing the Velocity method
   triggers a bug in the hotspot compilation.  Note that we've been
   running this configuration for 5 months
 
  Using the same JDK for those 5 months, or did you recently upgrade?
 
   - 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
 
 



PermGen Out of memory exception

2007-11-12 Thread Kanchana Welagedara
Hi All


I have developed 4 war files using Appfuse frame work.These war files
are independent.when I deployed any three war files the applications
are up and run.But when I deployed the 4th one (any) it throws a
PermGen exception.It has been copied in the bellow

1.Is this some thing related not setting the JAVA_OPTS ? or some security issue?

Can any body please Help me to revolve this problem.

Thanks
Kanchana


{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.21.2500;}\viewkind4\uc1\pard\f0\fs20 INFO:
XML validation disabled\par
AbandonedObjectPool is used
([EMAIL PROTECTED])\par
\par
   LogAbandoned: false\par
   RemoveAbandoned: true\par
   RemoveAbandonedTimeout: 60\par
AbandonedObjectPool is used
([EMAIL PROTECTED]
)\par
   LogAbandoned: false\par
   RemoveAbandoned: true\par
   RemoveAbandonedTimeout: 60\par
AbandonedObjectPool is used
([EMAIL PROTECTED])\par
\par
   LogAbandoned: false\par
   RemoveAbandoned: true\par
   RemoveAbandonedTimeout: 60\par
Nov 12, 2007 11:42:36 AM org.apache.catalina.core.StandardContext
resourcesStart\par
\par
SEVERE: Error starting static Resources\par
java.lang.IllegalArgumentException: Document base
C:\\Tomcat-5.5.20\\webapps\\spike\par
flow does not exist or is not a readable directory\par
at 
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.\par
java:140)\par
at 
org.apache.catalina.core.StandardContext.resourcesStart(StandardConte\par
xt.java:3848)\par
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4\par
019)\par
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)\par
\par
at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)\par
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)\par
\par
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442\par
)\par
at 
org.apache.catalina.core.StandardService.start(StandardService.java:4\par
50)\par
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709\par
)\par
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)\par
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\par
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.\par
java:39)\par
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces\par
sorImpl.java:25)\par
at java.lang.reflect.Method.invoke(Method.java:585)\par
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)\par
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)\par
Nov 12, 2007 11:42:37 AM org.apache.catalina.core.StandardContext start\par
SEVERE: Error in resourceStart()\par
Nov 12, 2007 11:42:37 AM org.apache.catalina.core.StandardContext start\par
SEVERE: Error getConfigured\par
Nov 12, 2007 11:42:37 AM org.apache.catalina.core.StandardContext start\par
SEVERE: Context [/spikeflow] startup failed due to previous errors\par
Nov 12, 2007 11:42:37 AM org.apache.catalina.core.StandardContext stop\par
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/\par
spikeflow] has not been started\par
AbandonedObjectPool is used
([EMAIL PROTECTED])\par
\par
   LogAbandoned: false\par
   RemoveAbandoned: true\par
   RemoveAbandonedTimeout: 60\par
Nov 12, 2007 11:43:26 AM org.apache.coyote.http11.Http11BaseProtocol start\par
INFO: Starting Coyote HTTP/1.1 on http-8282\par
Nov 12, 2007 11:43:27 AM org.apache.jk.common.ChannelSocket init\par
INFO: JK: ajp13 listening on /0.0.0.0:8009\par
Nov 12, 2007 11:43:27 AM org.apache.jk.server.JkMain start\par
INFO: Jk running ID=0 time=0/62  config=null\par
Nov 12, 2007 11:43:27 AM org.apache.catalina.storeconfig.StoreLoader load\par
INFO: Find registry server-registry.xml at classpath resource\par
Nov 12, 2007 11:43:27 AM org.apache.catalina.startup.Catalina start\par
INFO: Server startup in 176718 ms\par
[TiphAdmin] ERROR [http-8282-Processor25]
ClickstreamListener.sessionDestroyed(6\par
0) |\par
java.lang.NullPointerException\par
at 
com.opensymphony.clickstream.ClickstreamListener.sessionDestroyed(Cli\par
ckstreamListener.java:55)\par
at 
org.apache.catalina.session.StandardSession.expire(StandardSession.ja\par
va:687)\par
at 
org.apache.catalina.session.StandardSession.isValid(StandardSession.j\par
ava:579)\par
at 
org.apache.catalina.connector.Request.doGetSession(Request.java:2200)\par
\par
at 
org.apache.catalina.connector.Request.getSession(Request.java:2024)\par
at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.\par
java:831)\par
at 
org.springframework.web.context.request.ServletRequestAttributes.ini\par
t(ServletRequestAttributes.java:81)\par
at 
org.springframework.web.context.request.RequestContextListener.reques\par

Re: PermGen Out of memory exception

2007-11-12 Thread Jim

Hi Kanchana,

Java processes use two types of memory: the heap (which is garbage 
collected), and PermGen memory (which is not garbage collected).


Generally speaking, you won't run out of heap memory unless your 
application is set up so that the memory for all the objects being used 
at a single moment (and thus, which can't be garbage collected) is 
greater than the heap space.  In this case, you would only increase the 
amount of heap memory associated with a process to lower the frequency 
at which the application needs to run the garbage-collection process 
(the tradeoff: when the garbage collector /does/ run, it'll take 
longer).  You can change the maximum heap-size for a process by adding 
the -Xmx #m flag to your java command.  e.g. java MyApplication 
-Xmx128m


PermGen space, on the other hand, doesn't get garbage collected, so you 
need to ensure you're allocating enough to handle all that your 
application will need.  Unfortunately with the web application 
classloader-system, every time you deploy an application without 
restarting the application server, more PermGen space is eaten up, and 
this is never recovered (not even if you undeploy an application).  By 
default (at least, if you're using Sun Java), a Java process is given 
32Mb of PermGen memory.  If you have the -server flag set for your 
Java process, the default is 64Mb.  I found that my mid-sized 
Hibernate/Spring/Tapestry application would eat up ~8Mb of PermGen 
memory every deploy; so increasing this memory to 128M+ will directly 
influence the number of deploys you can do before you'll have problems.


To set the upper-bound of PermGen space, then, use the flag: 
-XX:MaxPermSize=#m.  By the way, to add these flags, if you're using 
startup.bat on Windows you can add 'SET JAVA_OPTS=%JAVA_OPTS% -server 
-...' lines to the top of it to append flags to your JAVA_OPTS variable 
before the server is started using those flags.  If you're on *nix, you 
can add 'export JAVA_OPTS=$JAVA_OPTS -server -' lines to your 
startup.sh.


Note that you can simply restart your application server to clear out 
all PermGen memory that was used with applications that you've 
undeployed.  So, I'd use a memory profiler (I used YourKit) to see how 
much PermGen space is used by your application each deploy, and set your 
PermGen space high enough to cover all of your different apps 
side-by-side, plus some extra memory to handle the number of hot-deploys 
you expect yourself having to make at some point -- and then just 
remember to restart the server when you can after a hot-deploy or two.


Jim

Kanchana Welagedara wrote:

Hi All


I have developed 4 war files using Appfuse frame work.These war files
are independent.when I deployed any three war files the applications
are up and run.But when I deployed the 4th one (any) it throws a
PermGen exception.It has been copied in the bellow

1.Is this some thing related not setting the JAVA_OPTS ? or some security issue?

Can any body please Help me to revolve this problem.

Thanks
Kanchana


{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.21.2500;}\viewkind4\uc1\pard\f0\fs20 INFO:
XML validation disabled\par
AbandonedObjectPool is used
([EMAIL PROTECTED])\par
\par
   LogAbandoned: false\par
   RemoveAbandoned: true\par
   RemoveAbandonedTimeout: 60\par
AbandonedObjectPool is used
([EMAIL PROTECTED]
)\par
   LogAbandoned: false\par
   RemoveAbandoned: true\par
   RemoveAbandonedTimeout: 60\par
AbandonedObjectPool is used
([EMAIL PROTECTED])\par
\par
   LogAbandoned: false\par
   RemoveAbandoned: true\par
   RemoveAbandonedTimeout: 60\par
Nov 12, 2007 11:42:36 AM org.apache.catalina.core.StandardContext
resourcesStart\par
\par
SEVERE: Error starting static Resources\par
java.lang.IllegalArgumentException: Document base
C:\\Tomcat-5.5.20\\webapps\\spike\par
flow does not exist or is not a readable directory\par
at 
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.\par
java:140)\par
at 
org.apache.catalina.core.StandardContext.resourcesStart(StandardConte\par
xt.java:3848)\par
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4\par
019)\par
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)\par
\par
at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)\par
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)\par
\par
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442\par
)\par
at 
org.apache.catalina.core.StandardService.start(StandardService.java:4\par
50)\par
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709\par
)\par
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)\par
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\par
at 

RE: PermGen Out of memory exception

2007-11-12 Thread Peter Crowther
 From: Jim [mailto:[EMAIL PROTECTED]
 PermGen space, on the other hand, doesn't get garbage
 collected, so you
 need to ensure you're allocating enough to handle all that your
 application will need.  Unfortunately with the web application
 classloader-system, every time you deploy an application without
 restarting the application server, more PermGen space is eaten up, and
 this is never recovered (not even if you undeploy an application).

Not entirely true.  Modern Java virtual machines perform garbage collection on 
PermGen, but it's remarkably easy to leave a reference lying around that will 
hold a class in memory - which holds the class' ClassLoader in memory, which 
holds all the other classes loaded by that ClassLoader in memory.  Unless you 
have unusually good hygiene rules as you develop, this makes it look like 
PermGen never gets garbage collected!

There's plenty of past discussion on the list on this topic; I've no doubt 
Chuck will reply, but I suggest http://tomcat.apache.org/faq/memory.html as a 
good place to start reading.

It may not be your webapp's code that's at fault, by the way.  There are plenty 
of third party libraries that don't clean up after themselves properly 
(including some I've written, I'm ashamed to admit).

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PermGen Out of memory exception

2007-11-12 Thread Jim

Caldarale, Charles R wrote:
From: Jim [mailto:[EMAIL PROTECTED] 
Subject: Re: PermGen Out of memory exception


PermGen space, on the other hand, doesn't get garbage collected



As Peter C indicated, this is utter BS.  Why do people keep propagating
this fallacy?  Easier to blame the JVM than take responsibility for bugs
in your own code?
  
Cool, thanks a lot for the clarification, and sorry about that.  So 
there's nothing in the JVM or Tomcat (possible unknown/unfixed bugs 
notwithstanding) that precludes PermGen space from being recovered via 
garbage collection when undeploying an application?  It's necessarily a 
leak in the application or one of the libraries/frameworks it uses?


To address your rhetorical question :) , this issue is a mess to 
research.  This industry being what it is, it can be intimidating to be 
pointed at a 21 page Sun white paper when users are screaming because 
the application is down; it certainly makes it hard for me to defend the 
learning curve of using Java-based open source approaches when that's 
the suggested avenue.  People are obviously going to look for the quick 
answers first:  Tomcat's FAQ (http://tomcat.apache.org/faq/memory.html) 
suggests too many servlets/JSPs for the PermGen issue.  I use frameworks 
rather than servlets/JSPs directly, but when I go to the forums/bugs for 
those frameworks, they're usually blaming each other, or Tomcat, or the 
JVM.  Turning, then, to a couple examples from Google:
   - Google tomcat permgen and get 
http://www.jroller.com/agileanswers/entry/preventing_java_s_java_lang, 
which suggests upgrading Tomcat, or switching to JRockit, or upgrading 
the JVM.
   - Google permgen error, and get 
http://my.opera.com/karmazilla/blog/2007/03/15/permgen-strikes-back, 
which says: And finally, the permanent generation. This is for objects 
that the virtual machine has decided to endorse with eternal life - 
which is precicely the core of the problem. Objects in the permanent 
generation are never garbage collected; that is, under /normal/ 
circumstances when the jvm is started with /normal/ command line 
parameters.


It's hard not to take that last snippet at face value, for example, when 
a blank application with a framework stack leaks on reload, and all said 
frameworks claim to be leak-free.  It's also called /Perm/Gen.  The 
fallacy's just not obvious, and there's no simple authority on this 
common issue.


Perhaps the Tomcat FAQ on memory-issues could be fleshed out/updated?  
With so many blogs, forum posts, and bug-report-discussion-threads 
suggesting that it's normal to expect an unbounded PermGen increase when 
reloading/redeploying applications, an explicit contrary statement in 
the FAQ would be helpful, if even to clarify for users that yes, they 
/should/ bother doing their own memory-profiling on this issue, because 
there /is/ a problem with some code they're using, whether it's theirs 
or another party's.  The PermGen discussion in the FAQ should be 
expanded to include the now-common case of PermGen running out not 
because of servlets/JSPs but because of Hibernate's heavy PermGen usage, 
or because some other third party is precluding classloader garbage 
collection on reload/redeploy (which would be a great place for the link 
to Spring's compilation of leak issues with third-party libraries).


Jim

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PermGen Out of memory exception

2007-11-12 Thread Caldarale, Charles R
 From: Jim [mailto:[EMAIL PROTECTED] 
 Subject: Re: PermGen Out of memory exception
 
 To address your rhetorical question :) , this issue is a 
 mess to research.

Which is why it should be done before deployment...

 it can be intimidating to be pointed at a 21 page
 Sun white paper

Try this one first:
http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html

Unfortunately, it does not address class-heavy situations, such as app
servers.

 http://www.jroller.com/agileanswers/entry/preventing_java_s_java_lang,

 which suggests upgrading Tomcat, or switching to JRockit, or 
 upgrading the JVM.

Switching to JRockit only masks the problem temporarily, since it
doesn't have a separate space for instances of java.lang.Class; do
enough app reloads with JRockit, and you will run into the problem.
We've also found other significant issues with JRockit, so I can't
recommend it.

 http://my.opera.com/karmazilla/blog/2007/03/15/permgen-strikes-back

This one article is the source of much misinformation.  It's unfortunate
that the author has decided his conclusions are the only possible ones
that explain the symptoms, regardless of reality.

 The fallacy's just not obvious, and there's no simple authority 
 on this common issue.

Well, actually there is - look at the HotSpot JVM code, which is freely
available.  Of course, there are side effects (My brain hurts! It
will have to come out. :-).

 Perhaps the Tomcat FAQ on memory-issues could be fleshed 
 out/updated?  

This specific item is already in the Tomcat FAQ:
If you have a lot of servlets or JSP's, you may need to increase your
permanent generation. By default, it is 64MB. Doubling [sic] it to be
-XX:MaxPermSize=256m might be a good start.

 an explicit contrary statement in the FAQ would be helpful

This article linked to from Your classloaders are not being garbage
collected seems to cover pretty much everything you've asked for.  For
reference, it points to the following location:
http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action
?pageId=2669

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PermGen Out of memory exception

2007-11-12 Thread Jim

Caldarale, Charles R wrote:
Perhaps the Tomcat FAQ on memory-issues could be fleshed 
out/updated?  



This specific item is already in the Tomcat FAQ:
If you have a lot of servlets or JSP's, you may need to increase your
permanent generation. By default, it is 64MB. Doubling [sic] it to be
-XX:MaxPermSize=256m might be a good start.
  
The problem with that language is it implies that PermGen space is 
generally only an issue if you're using a lot of servlets or JSPs.  But 
these days, I assume more people are getting PermGen issues not with 
servlets/JSPs but with framework stacks -- e.g. Hibernate makes hungry 
use of PermGen.  Further, this entry implies that an application will 
take a static amount of PermGen, so doubling it will solve the problem, 
but I read about a lot of people having this issue on reload/redeploy -- 
i.e. the classloader leak, but there's nothing in the FAQ linking the 
PermGen error to the Your classloaders are not being garbage collected 
link.  I agree with you that that article has pretty much everything, 
but it's put at the end of the list almost as an afterthought, and I'd 
also suggest that if someone had already concluded that their 
classloaders were not being garbage collected, they'd have already found 
that link.  We should put some marquee and blink tags around it! : )


Mostly I'm just being defensive, but I do truly appreciate the correction.
Jim

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PermGen Out of memory exception

2007-11-12 Thread Caldarale, Charles R
 From: Jim [mailto:[EMAIL PROTECTED] 
 Subject: Re: PermGen Out of memory exception
 
 The problem with that language is it implies that PermGen space is 
 generally only an issue if you're using a lot of servlets or JSPs.

Agreed, that's not inclusive enough.

 there's nothing in the FAQ linking the PermGen error to the
 Your classloaders are not being garbage collected link.

Yes, that should be clearer.

(Poking around, I can't find any doc on how to update the FAQ - it
doesn't appear to be in the source tree, but I might have missed it.)
In any event, if you have suggested wording updates, please submit them
via Bugzilla.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]