Get a heapdump, use yourkit/visualvm. On Mon, Jul 16, 2012 at 11:14 AM, Ian Marshall <[email protected]> wrote: > I don't think that I am getting the session size in the right place. Despite > my session sizes being logged as very small at ~1.7kB using the Google App > Engine (GAE) web development server, in GAE production I am getting session > sizes approaching 1MB (and attempting to breach this GAE-imposed limit of > 1MB too). > > I shall have to try and find somewhere else to get a meaningful session > size. > > > > Ian Marshall wrote >> >> Thanks Martin, >> >> I could not find onDetach() but found detach() so I have done this in my >> WebSession subclass: >> >> @Override >> public void detach() >> { >> long loSize = getSizeInBytes(); >> m_logger.log(Level.FINE, String.format("Session size = %,dB.", >> loSize)); >> super.detach(); >> } >> >> This seems to be fine (my sessions seem very small at ~1.7kB - I must be >> doing something wrong) except that this method can be called several times >> as a result of one request. >> >> Thanks again, >> >> Ian >> >> >> >> Martin Grigorov-4 wrote >>> >>> Override Session#onDetach() and do it before calling super.onDetach(). >>> >>> On Fri, Jul 13, 2012 at 2:01 PM, Ian Marshall <IanMarshall.UK@> >>> wrote: >>>> Hello, >>>> >>>> Is there a good way to discover my serialised or about-to-be-serialised >>>> session size without adding the debug bar to my page? >>>> >>>> I currently use >>>> >>>> @Override >>>> protected void onAfterRender() >>>> { >>>> super.onAfterRender(); >>>> >>>> CloudSession ssnSession = (CloudSession)getSession(); >>>> long loSize = ssnSession.getSizeInBytes(); >>>> m_logger.log(Level.FINE, String.format("Session size = %,dB.", >>>> loSize)); >>>> } >>>> >>>> in my WebPage subclass, but I suspect that this is the wrong place to >>>> examine the session size. >>>> >>>> My software environment is: >>>> >>>> Web framework: Wicket 1.5.7 >>>> Web server system: Google App Engine for Java version 1.7.0 >>>> Java: 1.6.0_33; Java HotSpot(TM) Client VM 20.8-b03 >>>> Operating system: Microsoft Windows XP Home Edition version 2002 SP3 >>>> (version 5.1 running on x86; Cp1252; en_GB) >>>> >>>> >>>> Ian Marshall >> > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Determine-session-size-for-Wicket-1-5-tp4650050p4650543.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
