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