Yup, it looks like you have more of your application objects taking up
memory than the tickets you were worried about.
So True! We are right now designing and developing our next generation
of websites and this experience will surely come handy. I will now
think twice before I store anything in
From: Joe Hansen [mailto:joe.hansen...@gmail.com]
Subject: Re: java.lang.OutOfMemoryError: Java heap space
Is the use of SoftReference popular?
You'll find it as the underlying mechanism of many cache managers, since it
automatically adapts reasonably well to whatever the execution
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Joe,
On 10/8/2009 12:12 PM, Joe Hansen wrote:
I will now think twice before I store anything in the session and
will make sure I remove no longer used objects from the HTTP
Session.
It's always a good goal to limit your session size, but it's not
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
A correction to my code:
On 10/8/2009 4:22 PM, Christopher Schultz wrote:
public class SoftReferenceFilter
implements Filter
{
This class needs two additional methods:
public void init(FilterChain chain) { }
public void
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
Another correction to the code:
On 10/8/2009 4:22 PM, Christopher Schultz wrote:
public static class SoftReferenceSessionWrapper
implements HttpSession
{
Remember to implement getValue and putValue to call getAttribute and
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Joe,
On 10/6/2009 3:44 PM, Joe Hansen wrote:
I did not check the CPU usage when the issue happened. I just checked
the web application logs and found that first there was an
OutOfMemoryError, followed by MySQL errors when
WoW! jmap was a great command to learn Chris! Thank you so much!
I generated a histogram of the Objects in the java heap (while things
were stable) and here's what I got:
Object Histogram:
SizeCount Class description
---
149989048
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Joe,
On 10/7/2009 8:40 PM, Joe Hansen wrote:
WoW! jmap was a great command to learn Chris! Thank you so much!
Yeah, it's great as a poor-man's memory profiler. On the other hand, I
haven't seen a big-time memory profiler offer such a simple view of
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Subject: Re: java.lang.OutOfMemoryError: Java heap space
There are even techniques that will allow your session objects to
expire when memory gets tight (which is super cool IMO).
To put a name on the above technique, read up
On 05.10.2009 22:04, André Warnier wrote:
André Warnier wrote:
...
and still wants to add something :
- a new KeepAlive connection is made from the browser to Apache (httpd).
- then a request comes in on that connection, and it happens to be one
that gets forwarded to Tomcat. So a mod_jk
On 05.10.2009 18:58, Joe Hansen wrote:
Thank you so much for your tips, Rainer!
The websites went down yet again. Increasing the java heap size took
care of the OutOfMemoryError, but the number of httpd processes keep
increasing until the websites crash. I haven't added any new code in
the
On 05.10.2009 18:58, Joe Hansen wrote:
Thank you so much for your tips, Rainer!
The websites went down yet again. Increasing the java heap size took
care of the OutOfMemoryError, but the number of httpd processes keep
increasing until the websites crash. I haven't added any new code in
the
Rainer,
Thanks for looking at those long thread dumps for me!!
I am sorry. I did NOT take these dumps at the right time (i.e. when
Tomcat was inundated with requests and couldn't cope with the load).
After I increased the heap size to 512MB (from 64MB default), I am not
getting the
Rainer,
I spoke to soon! As I suspected, the problem isn't fixed yet and the
websites crashed again. This time I took three thread dumps at the
time tomcat was down. Here they are: http://pastebin.com/m2a7e1198
I will learn from your previous analysis of the thread dumps and I try
to understand
There were 29 httpd processes running when the websites crashed.
One thing that was clear from the thread dumps was there were lots of
entries for org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner:
Starting cleaning of expired tickets from ticket registry at ...
Does that
On 06.10.2009 19:44, Joe Hansen wrote:
I will only comment the threads for the AJP pool. Everything else seems
not relevant:
Dump 1:
20 threads connected to Apache, waiting for the next request
3 threads idle in the pool
1 thread waiting for the next connection
0 threads working on requests
Thanks for your feedback, Rainer.
The DAO objects/methods that you've mentioned are used for almost
every page on our website. So I am not surprised to find them in the
thread dumps. However, as you pointed out, the parameters to these
methods change depending on the page they are on and if the
Rainer Jung wrote:
On 06.10.2009 21:44, Joe Hansen wrote:
...
It seems your application is CPU heavy. Either the data objects handled
are to heavy weight (maybe some user having huge Fotoset or Email list)
or the request rate is simply to large. Is the CPU saturated during the
problems?
I
I changed the session-timeout for the CAS webapp to 1 hour and
restarted Apache/Tomcat to see if that changes anything. If the issue
manifests again, I will surely check the memory and cpu usage using
the top command.
Rainer, I somewhat doubt that getAllFotosets() is causing the problem.
Because
2009/10/6 Joe Hansen joe.hansen...@gmail.com:
Andre, you are right. Memory is cheap. However, the machine has 8GB of
memory already. I am thinking that it should be sufficient.
You might wish to dedicate more of that 8 Gbyte to Java, though. It
depends on the performance characteristics of
Thank you so much for your tips, Rainer!
The websites went down yet again. Increasing the java heap size took
care of the OutOfMemoryError, but the number of httpd processes keep
increasing until the websites crash. I haven't added any new code in
the past few months, hence I am surprised why the
Rainer,
Here are the KeepAlive values in httpd.conf:
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimout 15
Thanks,
Joe
What are your KeepAlive* settings ?
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
Joe Hansen wrote:
Rainer,
Here are the KeepAlive values in httpd.conf:
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimout 15
Well, since you have KeepAlive Off, the other 2 do not matter.
But as such, it means that each request of each browser is going to
create a new connection to the
Thank you for the reply, Andre.
I now understand how setting KeepAlive to On would improve the
performance of a website (The Apache manual says that a 50% increase
in throughput could be expected). So I changed the KeepAlive to On and
restarted the server.
I however wonder if this will fix the
Joe Hansen wrote:
Thank you for the reply, Andre.
I now understand how setting KeepAlive to On would improve the
performance of a website (The Apache manual says that a 50% increase
in throughput could be expected). So I changed the KeepAlive to On and
restarted the server.
Now wait.
You
André Warnier wrote:
...
and still wants to add something :
- a new KeepAlive connection is made from the browser to Apache (httpd).
- then a request comes in on that connection, and it happens to be one
that gets forwarded to Tomcat. So a mod_jk connection is made to
Tomcat, Tomcat allocates
From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: java.lang.OutOfMemoryError: Java heap space
The bottleneck would be in Tomcat, but it would show up at the
httpd level.
The bottleneck might also be in something external to Tomcat, such as a
database or some external web service
Andre, Thanks for pointing out the high KeepAliveTimeout value in the
config file. I have read the docs and have changed it to 5 seconds
(which is the default).
I am hoping that Rainer could find out from the thread dump where the
requests are getting stuck, so that I can put this issue to bed.
Rainer, Thank you so much for your kind reply!
I have increased the java heap size to 512MB (-Xms512m -Xmx512m). I am
hoping that would fix the issue. I had configured our webserver to use
Jasig's Central Authentication System (CAS). Recently I increased the
session timeout from 30 minutes to 4
I found the following error message in the Apache logs:
[Sat Oct 03 04:10:49 2009] [error] server reached MaxClients setting,
consider raising the MaxClients setting
Here's a snippet from the httpd.conf, which deals with MaxClients.
IfModule prefork.c
StartServers 8
MinSpareServers5
On 04.10.2009 22:17, Joe Hansen wrote:
I found the following error message in the Apache logs:
[Sat Oct 03 04:10:49 2009] [error] server reached MaxClients setting,
consider raising the MaxClients setting
Here's a snippet from the httpd.conf, which deals with MaxClients.
IfModule prefork.c
Hi Joe,
On 04.10.2009 21:45, Joe Hansen wrote:
Rainer, Thank you so much for your kind reply!
I have increased the java heap size to 512MB (-Xms512m -Xmx512m). I am
hoping that would fix the issue. I had configured our webserver to use
Jasig's Central Authentication System (CAS). Recently I
Joe Hansen wrote:
I found the following error message in the Apache logs:
[Sat Oct 03 04:10:49 2009] [error] server reached MaxClients setting,
consider raising the MaxClients setting
Here's a snippet from the httpd.conf, which deals with MaxClients.
IfModule prefork.c
StartServers 8
On 03.10.2009 20:07, Joe Hansen wrote:
Hey All,
I get this error (java.lang.OutOfMemoryError: Java heap space) after
my Apache 2.0/Tomcat 5.5/mod_jk installation has been up and running
for a few hours. This problem started just since two days. Never had
this issue before!
I have also
From: Jean-Sebastien Pilon [mailto:[EMAIL PROTECTED]
Subject: java.lang.OutOfMemoryError: Java heap space
What could be my problem
Your application has a memory leak (or you might be running out of
PermGen space).
where should I look next ?
http://tomcat.apache.org/faq/memory.html
-
Add -XX:+HeapDumpOnOutOfMemoryError to your command line options,
this will create a .hprof file when you get an OOM error, then simply
analyze this file with a little tool called YourKit (www.yourkit.com)
excellent profiler
Filip
Jean-Sebastien Pilon wrote:
Hello,
I have been
36 matches
Mail list logo