[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2436) Session-scoped SFSB which holds entities leaks memory
Susanne Jarl (JIRA)
jira-events at lists.jboss.org
Fri Mar 14 16:03:28 EDT 2008
[ http://jira.jboss.com/jira/browse/JBSEAM-2436?page=comments#action_12403006 ]
Susanne Jarl commented on JBSEAM-2436:
I expect my entities to be destroyed when the SFSB that holds the entities is destroyed.
When I'm writing about number of entities I mean the number being held by the JVM seen through a profiler. I used the profiler that comes with Java 6. Always when I write "number of instances" I mean the number being held by the JVM. Maybe this is not correct way to express that. Is the correct expression "number of instances held by the JVM"?
If I set the session timeout to 2 minutes I will not get a OOME. You can see that garbage collection works in the profiler - the number of instances is held at a rather constant level that varies with load during the hours of the day. But if you set the session timeout higher the garbage collection does not work - number of instances in the JVM is increasing. The higher I set the session timout the sooner I get the OOME.
I am sure of that the problem is not that the session has not timed out yet, that the number of instances are growing. I have followed the profiler closely and I believe that the correct behaviour would be if I set the session timeout to 10 minutes, after 10 minutes the number of instances should be around the same value as long as the load on the web page is about the same. But the number of instances has increased regardless of the load is the same or decreasing. I followed this for several hours with a 10 minutes session timeout and even after 2 hours with decreasing load the number of instances continued to grow.
I am not 100% sure but I think that the SFSB do not get destroyed either. But why would that not be a bug? The garbage collection seems to stop working for SFSB in session scope which holds entities if the session timeout is set higher than 2 minutes. Something is magic about this 2 minutes limit. There must be a bug somewhere. But like Antoine Sabot-Durand I also upgraded to JBoss 4.2.2 so the bug might be there and not in Seam 2.0.0?
> Session-scoped SFSB which holds entities leaks memory
> Key: JBSEAM-2436
> URL: http://jira.jboss.com/jira/browse/JBSEAM-2436
> Project: JBoss Seam
> Issue Type: Bug
> Components: EJB3
> Affects Versions: 2.0.0.GA
> Environment: Suse Linux, JBoss 4.2.2.GA, Java 1.6.03, PostgreSQL 8.2
> Reporter: Susanne Jarl
> Assigned To: Pete Muir
> Fix For: 2.1.0.GA
> Session-scoped SFSB which has entities in an object does not get destroyed. It leads to memory leak in production. Please read: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=126542
> The problem appeared after upgrading to Seam 2.0.0.GA. My code worked fine in Seam 1.2.1.
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues