You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Mark Lybarger <Ma...@CBC-Companies.com> on 2004/02/18 16:00:48 UTC

log user out - remove session info

I'm looking into our app performance these days.  In running a small jmeter script, my app starts throwing OutOfMemory errors.  The script logs into my app, places an order and log out. The script is set to do this 50 times.  It gets through about 5 and then i see the below stack trace for each subsequent request.  Thus, I'm looking for memory leaks.  Our app currently holds a lot of data in the user's session (RunData).  I've included our current log out code.  Does the removeUserFromSession() method clean up the httpSession object that's out there for the user?  it would be nice to take a look at object's in memory after this script runs for a while, but i haven't yet gotten the hyades plugin to give anything other than weblogic specific statistics. suggestions? ideas?

thanks!
~mark

logout code:
         if (data.getSession().getAttribute(AccessControlList.SESSION_KEY)!=null)
         {
            data.getSession().removeAttribute(AccessControlList.SESSION_KEY);
         }

         if(data.getUser() != null)
         {
             data.getUser().setHasLoggedIn(new Boolean(false));
             data.removeUserFromSession();
             data.save();
         }


errors:

2004-02-18 09:21:35,843 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] ERROR system - Turbine.handleException: null
2004-02-18 09:21:35,843 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] ERROR system - 
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(Unknown Source)
	at org.apache.turbine.util.velocity.VelocityActionEvent.perform(Unknown Source)
	at org.apache.turbine.modules.actions.VelocityAction.perform(Unknown Source)
	at org.apache.turbine.modules.actions.VelocitySecureAction.perform(Unknown Source)
	at org.apache.turbine.modules.ActionLoader.exec(Unknown Source)
	at org.apache.turbine.modules.pages.DefaultPage.doBuild(Unknown Source)
	at org.apache.turbine.modules.Page.build(Unknown Source)
	at org.apache.turbine.modules.PageLoader.exec(Unknown Source)
	at org.apache.turbine.Turbine.doGet(Unknown Source)
	at org.apache.turbine.Turbine.doPost(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
	at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
	at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
	at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
	at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Caused by: java.lang.OutOfMemoryError

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.574 / Virus Database: 364 - Release Date: 1/29/2004
 


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: log user out - remove session info

Posted by Eric Pugh <ep...@upstate.com>.
You could write a unit test..  look at src/tests to see some existing unit
tests for Turbine..   Then run it a whole bunch and see..  Look at
http://www.clarkware.com for an extension to junit

> -----Original Message-----
> From: Mark Lybarger [mailto:Mark.Lybarger@CBC-Companies.com]
> Sent: Wednesday, February 18, 2004 4:01 PM
> To: 'Turbine Users List' (E-mail)
> Subject: log user out - remove session info
> 
> 
> I'm looking into our app performance these days.  In running 
> a small jmeter script, my app starts throwing OutOfMemory 
> errors.  The script logs into my app, places an order and log 
> out. The script is set to do this 50 times.  It gets through 
> about 5 and then i see the below stack trace for each 
> subsequent request.  Thus, I'm looking for memory leaks.  Our 
> app currently holds a lot of data in the user's session 
> (RunData).  I've included our current log out code.  Does the 
> removeUserFromSession() method clean up the httpSession 
> object that's out there for the user?  it would be nice to 
> take a look at object's in memory after this script runs for 
> a while, but i haven't yet gotten the hyades plugin to give 
> anything other than weblogic specific statistics. suggestions? ideas?
> 
> thanks!
> ~mark
> 
> logout code:
>          if 
> (data.getSession().getAttribute(AccessControlList.SESSION_KEY)!=null)
>          {
>             
> data.getSession().removeAttribute(AccessControlList.SESSION_KEY);
>          }
> 
>          if(data.getUser() != null)
>          {
>              data.getUser().setHasLoggedIn(new Boolean(false));
>              data.removeUserFromSession();
>              data.save();
>          }
> 
> 
> errors:
> 
> 2004-02-18 09:21:35,843 [ExecuteThread: '14' for queue: 
> 'weblogic.kernel.Default'] ERROR system - 
> Turbine.handleException: null
> 2004-02-18 09:21:35,843 [ExecuteThread: '14' for queue: 
> 'weblogic.kernel.Default'] ERROR system - 
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
> 	at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at 
> org.apache.turbine.util.velocity.VelocityActionEvent.executeEv
> ents(Unknown Source)
> 	at 
> org.apache.turbine.util.velocity.VelocityActionEvent.perform(U
> nknown Source)
> 	at 
> org.apache.turbine.modules.actions.VelocityAction.perform(Unkn
> own Source)
> 	at 
> org.apache.turbine.modules.actions.VelocitySecureAction.perfor
> m(Unknown Source)
> 	at org.apache.turbine.modules.ActionLoader.exec(Unknown Source)
> 	at 
> org.apache.turbine.modules.pages.DefaultPage.doBuild(Unknown Source)
> 	at org.apache.turbine.modules.Page.build(Unknown Source)
> 	at org.apache.turbine.modules.PageLoader.exec(Unknown Source)
> 	at org.apache.turbine.Turbine.doGet(Unknown Source)
> 	at org.apache.turbine.Turbine.doPost(Unknown Source)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at 
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAct
> ion.run(ServletStubImpl.java:1053)
> 	at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:387)
> 	at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:305)
> 	at 
> weblogic.servlet.internal.WebAppServletContext$ServletInvocati
> onAction.run(WebAppServletContext.java:6310)
> 	at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedSubject.java:317)
> 	at 
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:118)
> 	at 
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(W
> ebAppServletContext.java:3622)
> 	at 
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe
> questImpl.java:2569)
> 	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> 	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> Caused by: java.lang.OutOfMemoryError
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.574 / Virus Database: 364 - Release Date: 1/29/2004
>  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org