|
Igor Minar made changes - 24/Mar/09 01:52 AM
Igor Minar made changes - 24/Mar/09 01:52 AM
Hi Anatoli, It's hard to tell why this started happening only recently. That's because our traffic grows quite rapidly (min 10% each month, a lot more during spikes). There were two recent changes:
I know, I know, the cache must be culprit! That's what I thought for a few weeks and kept on increasing the heap size. Then when I started analyzing the heap dumps I found out that the cache consumes less then 1GB of heap and a lot more space is consumed by the SAXParser and SessionImpl objects. The first thing that I started to suspect when looking at the dumps was that a reference to the hibernate session instance was stored in the http session. That would explain why there were more of these instances in the heap than the actual number of concurrent connections that were being processed. Our session expiration policy is set to 8 hours, which means that it can take a while for abandoned sessions to be gc-ed. This is not a problem if the session doesn't contain a lot of data, but could lead to problems similar to what we've been experiencing if there are bulky objects stored in the http session. So I think I'd start by checking what's being stored in the http session. Hi Igor, As far as I can tell from your heap dumps, the reason that the SessionImpls cannot be collected is because you have references to User objects (DefaultHibernateUser) stored within your HttpSession. Regards,
Andrew Lynch [Atlassian] made changes - 24/Mar/09 07:25 PM
The code in question (in DefaultAuthenticator) : final Principal user = getUser(username);
...
request.getSession().setAttribute(LOGGED_IN_KEY, user);
We could fix this by : 1) or 3) sound good. With 3) there is still a risk that the detached object will hold on to a large object tree though. I'm in favour of both option #1 and option #3. That is, we should patch Hibernate to clean up its session when it is closed and we should not store persistent objects in the app server session. To implement the latter, Seraph should allow the application to provide the object which is to be stored in the session. Confluence can provide a Principal which is a DefaultUser or something else not attached to the database session.
Matt Ryall [Atlassian] made changes - 13/May/09 01:17 AM
Hi guys, Any plans to get this fixed soon? We ran out of memory twice in the last week and we already use 5.5GB heap and Conf 3.0.1. I'm just examining the heap dumps and was able to confirm that the problems were caused by this particular bug. thanks Some more info from the heap dump: Each user object (com.atlassian.user.impl.hibernate.DefaultHibernateUser) was present in the dump five times. Thanks to All these user objects were retained on the heap due to references from hibernate collections. We have the user cache set to 130k, so due to can you please add
Partha Kamal [Atlassian] made changes - 30/Sep/09 07:04 PM
Hi Igor, I will be investigating the feasibility of a fix of this issue for 3.1. Regards, Thanks Andrew. We'd really appreciate to have this resolved soon and stabilize our site.
Anatoli Kazatchkov [Atlassian] made changes - 15/Oct/09 12:42 AM
Anatoli Kazatchkov [Atlassian] made changes - 27/Oct/09 07:46 PM
Andrew, is the patch being included in 3.1? Hi Igor, It will be in 3.1.1. Regards,
Andrew Lynch [Atlassian] made changes - 03/Dec/09 05:26 PM
Andrew Lynch [Atlassian] made changes - 03/Jan/10 05:27 PM
Chris Kiehl [Atlassian] made changes - 10/Jan/10 05:27 PM
Mark Hrynczak [Atlassian] made changes - 10/Jan/10 06:26 PM
Mark Hrynczak [Atlassian] made changes - 10/Jan/10 06:26 PM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Igor,
You mentioned that you only started noticing the problem in the last several weeks. Has anything been changed on the instance that might have triggered the problem? Any confluence upgrades, plugin upgrades, new plugin installed? The additional info might help us to narrow down the search for the bug.
Anatoli.