Okay, so you are storing *every* page in your page map in session.  So,
here's your next path (already partially explained by others):

1 - Consider: must you use http session store?  why?  A lot of folks *think*
that they must, and they switch to it, but they don't really need to.  Some
honestly need to.

2 - run a profiler or memory analyzer and see what's actually being held in
memory.  Probably large domain objects, or sometimes even services.

The reason you're holding these big objects is almost always one or both of
the following:

1 - improper use of models.  Not using detachable models.  Putting things
into new Model(someDomainObject).  Or holding fields references to domain
objects, or other large objects (even services).

2 - using final variables that are declared outside of an anonymous inner
class from within it (which creates a field variable in the anon-inn-class
for that object).


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


On Mon, Jan 17, 2011 at 9:27 AM, Mihai Toma <mihai.t...@asf.ro> wrote:

> Yes, I use HttpSessionStore.
>
> -----Original Message-----
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Monday, January 17, 2011 5:20 PM
> To: users@wicket.apache.org
> Subject: Re: session size
>
> Are you using HttpSessionStore (this is not the default - which means you
> would have to explicitly set this up in your application class)?
>
> On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov
> <mgrigo...@apache.org>wrote:
>
> > Try to find what is stored actually.
> > Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/
> >
> > <http://www.eclipse.org/mat/>I expect that you store some bigger
> > collections
> > with your data with some of your components.
> >
> > On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma <mihai.t...@asf.ro> wrote:
> >
> > > Hi!
> > >
> > >
> > >
> > > I have an application build with wicket and I have a session problem.
> > >
> > >
> > >
> > > If one user browse the application the session (the object WebSession)
> > > becomes bigger and bigger, so if I browse 20 pages the session size has
> > > around 16 Mb.
> > >
> > > When I start browsing the session has something less than 100 Kb.
> > >
> > >
> > >
> > > I read some things about the pages which are stored in session in
> > pageMaps
> > > and versions and I make different settings in Application class
> > > (getSessionSettings().setMaxPageMaps(10);
> > > getSessionSettings().setPageMapEvictionStrategy(new
> > > LeastRecentlyAccessedEvictionStrategy(10));
> > >
> > > ) but seems not to resolv my problem.
> > >
> > >
> > >
> > > Do you have any idea how can I limit the session size or how can I
> limit
> > > the
> > > number of pages stored in session?
> > >
> > >
> > >
> > > I use wicket 1.4.8.
> > >
> > >
> > >
> > > Thanks!
> > >
> > >
> >
>
>
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to