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 I have an administrator account on the website and I can view
more photosets than any other user. And when I login and view the
photosets nothing alarming seems to be happening. I am not ruling out
the possibility altogether though.

Andre, you are right. Memory is cheap. However, the machine has 8GB of
memory already. I am thinking that it should be sufficient. Here's the
output of the free command:
[r...@csiweb bin]# free -m
                         total        used       free
Mem:                 8113       7557       555
-/+ buffers/cache:                861     7252
Swap:                9012          33      8979

Its amazing how you and Andre are able to identify issues with others'
Tomcat installations just by looking at their logs and settings. It
speaks volumes of your experience with Tomcat.

Thank you,
Joe

On Tue, Oct 6, 2009 at 2:00 PM, Rainer Jung <rainer.j...@kippdata.de> wrote:
> On 06.10.2009 21:44, Joe Hansen wrote:
>> 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 user is
>> logged in or not.
>>
>> 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
>> TWFotoSetListDAO.getAllFotosets tried to get a database connection.
>>
>> I am *guessing* :
>> I changed the session timeout to 4 hours for the Jasig CAS
>> Single-Signon web application. This stores a ton of tickets in memory.
>> During a 4 hour period when there are more http requests, the 512MB of
>> Java Heap space is not sufficient to store all these tickets. During
>> that time OutOfMemoryError happens and all hell breaks loose
>> subsequently.
>>
>> I probably should decrease the session-timeout to 1 hour or so and see
>> if that changes things. Would you agree, Rainer?
>
> Could be. But it could also be, that getAllFotosets() is able to slurp
> in huge amounts of data to memory and that this is the reason for the OOME.
>
> Once you run into an OOME on heap, there's no good relief than
> restarting the whole JVM. After an OOME you can't prove the correctness
> of your app any more. Random objects might be missing, resulting in
> largely undefined behaviour in your webapp or even Tomcat.
>
> I'm a bit insisting on the getAllFotosets(), because I once was involved
> in troubleshooting for a social website and part of their problem was
> special users having extremely large social data. So once they hit the
> server it went OOME.
>
>> Thanks,
>> Joe
>
> Regards,
>
> Rainer
>

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

Reply via email to