I would agree that all of the user object is not used in every  
request. It sounds like I need to look at what is in this object and  
see if there is a better way I can split the data out and store it in  
the database.

Thanks to all for the replies.

One of the things I found was that we have had this issue for a while  
and never noticed but when we upgraded Apache::Session past 1.83 they  
had put in better error checking including a die statement in  
Apache::Session::Serialize::Storable if the session could not be  
properly extracted from the storage.

-John


On Dec 30, 2009, at 5:06 PM, Brad Lhotsky wrote:

> I'm using Catalyst now, but I'm not sure this is what sessions were
> designed for?
>
> Both in Mason and Catalyst, I only stored primary keys, never  
> serialized
> data or objects in the session.  I'd pull that data as necessary using
> the primary key for fact access.  I'd imagine if you coupled that
> technique with something like memcached or even something simple like
> CHI, you'd seen an increase in performance.
>
> I highly doubt that every part of your user object is being used in
> every request.
>
> On Tue, Dec 29, 2009 at 01:51:00PM -0500, John TUSK wrote:
>> Hi,
>>
>>      This is my first post, please let me know if this is not the correct
>> place to discuss this.
>>
>>      My site is using MasonX::Request::WithApacheSession to manage our
>> sessions (stored in a MySQL back end). We store an object  
>> representing
>> a user into the session and recently the User object has grown larger
>> than the column can handle. We tried the obvious of increasing the
>> column from a text to a large text but had performance issues with
>> that (I was given this information second hand and don't have any  
>> more
>> information about this at this time). Even if there were not
>> performance issues I think at the rate the developers are expanding
>> the user object we would just be prolonging the inevitable.
>>
>>      My questions are:
>>              is has anyone run into this before (session being too large for 
>> the
>> storage medium) and what have they (or you) done to resolve it?
>>              Is it a bad practice to store objects in the session object?
>>
>>      We've considered some options and I am leaning towards implementing
>> Storable hooks to clean up pieces of the objects to reduce their  
>> size.
>> Any other suggestions, comments or links to read are welcome. Thanks
>> in advance for any help you are able to provide.
>>
>> -John
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast  
>> and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Mason-users mailing list
>> Mason-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mason-users
>
> -- 
> Brad Lhotsky


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to