You nailed it on the head.  I was able to figure out how they're doing
their pickling and unpickling and its through the cPickle module.  I
managed to run the interpreter and attempt to do the load from file myself
and it fails.  I can't tell exactly what causes it to fail unfortunately.


> So I think you have an unpickling problem. Are you storing anything with a
> socket connection, db connection or anything else that would be pickled
> but
> not unpickled?

I don't use any obvious things like those that you mention, but I'm
wondering if perhaps its tripping over the file i/o our logging/tracing
buries internally.  I'm going down the road now of evaluating those
classes that seem unpicklable and hopefully it will come out in there.

your explanation was perfect, Ben, thanks a lot.  I was able to get down
into the webware source and find what I needed by following your
directions.  I appreciate the help!

jeremy



> Hey jeremy - I want to correct your theory. The dynamic session store
> doesn't do any introspection before deciding how to store session objects.
> That is, the types of values you add to the session do not affect how the
> dynamic session store treats that session object.
>
> As Matt pointed out, your problem is probably that the sessions cannot be
> pickled, but actually its unpickled in this case. When Webware shuts down,
> the dynamic session store will try to encode the sessions (using cPickle
> or
> pickle) and store them as files on the disk. If the session cannot be
> encoded, it's dropped.
>
> Try and reproduce/confirm this error using only one session:
> - Stop Webware
> - Delete all the session files in .../Webapps/Sessions/ (or wherever you
> are
> storing them)
> - Close all your browsers, delete local cookies, blah blah
> - Restart Webware
> - Create your scenario, then stop Webware
>
> Now here's the fun part:
> - If you do not have a new session file in the Sessions/ directory, you
> have
> a pickling problem. Your session could not be encoded and was dropped.
> - However, your problem is that there IS a session file in the Sessions/
> directory, but when the appserver starts up again, the SessionFileStore
> cannot decode it and raises a KeyError. That's your posted error on line
> 55
> of SessionFileStore, upon which SessionDynamicStore relies.
>
> So I think you have an unpickling problem. Are you storing anything with a
> socket connection, db connection or anything else that would be pickled
> but
> not unpickled? To help debug, hack into SessionFileStore.py and change
> line
> 55 to simply "raise" the exception thrown by the decoder, instead of
> raising
> a new KeyError.
>
>
> Hope that helps - Ben
>
>
>
>>
>> > Thanks, Matt--that's useful. We never (purposely) put anything but
>> > strings
>> > into the session store, so that skews our results in the "good"
>> > direction.
>> >
>> > Cheers!
>> > --
>> > David Hancock
>> >
>> > -----Original Message-----
>> > From: Matt Feifarek [mailto:[EMAIL PROTECTED]
>> > Sent: Wed 10/20/2004 6:12 PM
>> > To: Hancock, David (DHANCOCK)
>> > Cc: [EMAIL PROTECTED]
>> > Subject: Re: [Webware-discuss] session strangeness
>> >
>> > Thanks for that.
>> >
>> > I guess that it's not "way" :-)
>> >
>> > But it does depend on what gets pickled; if it stays in memory,
>> there's
>> > no pickling. I've noticed for example that pickling new style classes
>> > (with the getstate/setstate stuff) is pretty slow. Typical session
>> stuff
>> > like strings and ints should be no problem.
>> >
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
> more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to