We have a 4GB of heap and we had 20-30 concurrent users using our system and it ran out of memory.
Upon investigation we found that 2GB of the heap is being used by 20-30 org.apache.catalina.session.StandardSession on average containing 60MB. We looked at the contents of the session and found lots of org.orbeon.oxf.xforms.state.XFormsStateManager$1 which contains objects that represent the xforms the users are currently modifying. It appears that everytime you open an xform document, the XFormsStateManager creates an instance of the ExternalContext.Session.SessionListener which references that document it needs to remove when the session is destroyed. If a user opens another document and re-opens the previous one, it seems to again create an instance of the ExternalContext.Session.SessionListener because a key that starts with "oxf.xforms.state.manager.session-listeners-key." is not set. And because the session is not closed, a lot of org.orbeon.oxf.xforms.state.XFormsStateManager$1 accumulates over time which references big amounts of objects, the memory eventually runs out. Is there a configuration we are missing that controls how this session/org.orbeon.oxf.xforms.state.XFormsStateManager$1 is controlled or are we missing a configuration option somewhere? Thanks, Dave McIntyre -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Dave,
What you describe is correct. However the listener should be removed when documents are removed from the document cache, which is not infinite. Let's say you have 50 documents (default): <property as="xs:integer" name="oxf.xforms.cache.documents.size" value="50"/> Then there can be as many as 50 documents total. (If only one user is using the application andopens 50 docs, then that maximum is reached too.) The rest is serialized out and the session listener should be removed as well as the documents. Now at some point pre-3.9 there was a bug with this behavior, which we have since fixed: http://forge.ow2.org/tracker/index.php?func=detail&aid=315241&group_id=168&atid=350207 With which version do you have this issue? -Erik On Thu, Jun 30, 2011 at 5:28 PM, David McIntyre <[hidden email]> wrote: > We have a 4GB of heap and we had 20-30 concurrent users using our system and it ran out of memory. > > Upon investigation we found that 2GB of the heap is being used by 20-30 org.apache.catalina.session.StandardSession on average containing 60MB. We looked at the contents of the session and found lots of org.orbeon.oxf.xforms.state.XFormsStateManager$1 which contains objects that represent the xforms the users are currently modifying. It appears that everytime you open an xform document, the XFormsStateManager creates an instance of the ExternalContext.Session.SessionListener which references that document it needs to remove when the session is destroyed. If a user opens another document and re-opens the previous one, it seems to again create an instance of the ExternalContext.Session.SessionListener because a key that starts with "oxf.xforms.state.manager.session-listeners-key." is not set. And because the session is not closed, a lot of org.orbeon.oxf.xforms.state.XFormsStateManager$1 accumulates over time which references big amounts of objects, the memory eventually runs out. > > Is there a configuration we are missing that controls how this session/org.orbeon.oxf.xforms.state.XFormsStateManager$1 is controlled or are we missing a configuration option somewhere? > > Thanks, > > Dave McIntyre > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Thanks, Erik.
The version we're currently using is 3.8.0, so it sounds as though we're experiencing the bug you mentioned. We'll have to look into updating to the newer version. Cheers, Dave ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> To: [hidden email] Sent: Friday, 1 July, 2011 2:35:42 PM Subject: [ops-users] Re: HttpSession objects accumulating multiple instances of XFormsStateManager$1 Dave, What you describe is correct. However the listener should be removed when documents are removed from the document cache, which is not infinite. Let's say you have 50 documents (default): <property as="xs:integer" name="oxf.xforms.cache.documents.size" value="50"/> Then there can be as many as 50 documents total. (If only one user is using the application andopens 50 docs, then that maximum is reached too.) The rest is serialized out and the session listener should be removed as well as the documents. Now at some point pre-3.9 there was a bug with this behavior, which we have since fixed: http://forge.ow2.org/tracker/index.php?func=detail&aid=315241&group_id=168&atid=350207 With which version do you have this issue? -Erik On Thu, Jun 30, 2011 at 5:28 PM, David McIntyre <[hidden email]> wrote: > We have a 4GB of heap and we had 20-30 concurrent users using our system and it ran out of memory. > > Upon investigation we found that 2GB of the heap is being used by 20-30 org.apache.catalina.session.StandardSession on average containing 60MB. We looked at the contents of the session and found lots of org.orbeon.oxf.xforms.state.XFormsStateManager$1 which contains objects that represent the xforms the users are currently modifying. It appears that everytime you open an xform document, the XFormsStateManager creates an instance of the ExternalContext.Session.SessionListener which references that document it needs to remove when the session is destroyed. If a user opens another document and re-opens the previous one, it seems to again create an instance of the ExternalContext.Session.SessionListener because a key that starts with "oxf.xforms.state.manager.session-listeners-key." is not set. And because the session is not closed, a lot of org.orbeon.oxf.xforms.state.XFormsStateManager$1 accumulates over time which references big amounts of objects, the memory eventually runs out. > > Is there a configuration we are missing that controls how this session/org.orbeon.oxf.xforms.state.XFormsStateManager$1 is controlled or are we missing a configuration option somewhere? > > Thanks, > > Dave McIntyre > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > [Text File:message-footer.txt] -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |